Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Check the organization ID match with API Output #31796

Merged
merged 11 commits into from
Aug 11, 2023

Conversation

sousmangoosta
Copy link
Contributor

Description

When doing an import of an organization, we provide an ID that can be different to the real one, and stored in the state without any comparison.

Relations

Closes #31783

@github-actions
Copy link

github-actions bot commented Jun 6, 2023

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/organizations Issues and PRs that pertain to the organizations service. needs-triage Waiting for first response or review from a maintainer. labels Jun 6, 2023
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 7, 2023
@ewbankkit ewbankkit self-assigned this Aug 11, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 11, 2023
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccOrganizations_serial/^Organization$$' PKG=organizations
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/organizations/... -v -count 1 -parallel 20  -run=TestAccOrganizations_serial/^Organization$ -timeout 180m
=== RUN   TestAccOrganizations_serial
=== PAUSE TestAccOrganizations_serial
=== CONT  TestAccOrganizations_serial
=== RUN   TestAccOrganizations_serial/Organization
=== RUN   TestAccOrganizations_serial/Organization/FeatureSet_Update
=== RUN   TestAccOrganizations_serial/Organization/DataSource_basic
=== RUN   TestAccOrganizations_serial/Organization/DataSource_delegatedAdministrator
    acctest.go:804: skipping test because at least one environment variable of [AWS_ALTERNATE_PROFILE AWS_ALTERNATE_ACCESS_KEY_ID] must be set. Usage: credentials for running acceptance testing in alternate AWS account.
=== RUN   TestAccOrganizations_serial/Organization/basic
=== RUN   TestAccOrganizations_serial/Organization/AwsServiceAccessPrincipals
=== RUN   TestAccOrganizations_serial/Organization/EnabledPolicyTypes
=== RUN   TestAccOrganizations_serial/Organization/FeatureSet_Basic
=== RUN   TestAccOrganizations_serial/Organization/FeatureSet_ForcesNew
=== RUN   TestAccOrganizations_serial/Organization/DataSource_memberAccount
--- PASS: TestAccOrganizations_serial (359.34s)
    --- PASS: TestAccOrganizations_serial/Organization (359.34s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_Update (40.78s)
        --- PASS: TestAccOrganizations_serial/Organization/DataSource_basic (22.27s)
        --- SKIP: TestAccOrganizations_serial/Organization/DataSource_delegatedAdministrator (0.00s)
        --- PASS: TestAccOrganizations_serial/Organization/basic (24.49s)
        --- PASS: TestAccOrganizations_serial/Organization/AwsServiceAccessPrincipals (57.17s)
        --- PASS: TestAccOrganizations_serial/Organization/EnabledPolicyTypes (150.09s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_Basic (23.39s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_ForcesNew (41.05s)
        --- PASS: TestAccOrganizations_serial/Organization/DataSource_memberAccount (17.95s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/organizations	364.095s

@ewbankkit
Copy link
Contributor

@sousmangoosta Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 2e928cc into hashicorp:main Aug 11, 2023
34 checks passed
@github-actions github-actions bot added this to the v5.13.0 milestone Aug 11, 2023
@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Aug 18, 2023
@github-actions
Copy link

This functionality has been released in v5.13.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2023
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
@sousmangoosta sousmangoosta deleted the b-organization_import branch February 22, 2024 08:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/organizations Issues and PRs that pertain to the organizations service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: aws_organizations_organization resource import doesn't validate input organization id.
3 participants