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

r/aws_organizations_organization: Fix regression caused by checking for correct Org ID in Read #33091

Merged
merged 3 commits into from
Aug 18, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Aug 18, 2023

Description

Moves the checking of the Org ID specified during terraform import to the import alone, preventing errors during terraform refresh if an existing resource had been imported with an invalid id.

Relations

Closes #33083.

Output from Acceptance Testing

% 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/DataSource_memberAccount
    acctest.go:931: this AWS account must be an existing member of an AWS Organization
=== RUN   TestAccOrganizations_serial/Organization/DataSource_delegatedAdministrator
    acctest.go:805: 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/FeatureSet_Basic
=== RUN   TestAccOrganizations_serial/Organization/FeatureSet_ForcesNew
=== RUN   TestAccOrganizations_serial/Organization/DataSource_basic
=== RUN   TestAccOrganizations_serial/Organization/disappears
=== RUN   TestAccOrganizations_serial/Organization/EnabledPolicyTypes
=== RUN   TestAccOrganizations_serial/Organization/FeatureSet_Update
--- PASS: TestAccOrganizations_serial (398.19s)
    --- PASS: TestAccOrganizations_serial/Organization (398.19s)
        --- SKIP: TestAccOrganizations_serial/Organization/DataSource_memberAccount (0.66s)
        --- SKIP: TestAccOrganizations_serial/Organization/DataSource_delegatedAdministrator (0.00s)
        --- PASS: TestAccOrganizations_serial/Organization/basic (25.29s)
        --- PASS: TestAccOrganizations_serial/Organization/AwsServiceAccessPrincipals (59.23s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_Basic (24.94s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_ForcesNew (43.48s)
        --- PASS: TestAccOrganizations_serial/Organization/DataSource_basic (23.74s)
        --- PASS: TestAccOrganizations_serial/Organization/disappears (19.37s)
        --- PASS: TestAccOrganizations_serial/Organization/EnabledPolicyTypes (159.03s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_Update (42.44s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/organizations	403.454s

@github-actions
Copy link

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 the size/XS Managed by automation to categorize the size of a PR. label Aug 18, 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 18, 2023
@github-actions github-actions bot added the service/organizations Issues and PRs that pertain to the organizations service. label Aug 18, 2023
@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Aug 18, 2023
@github-actions github-actions bot added service/organizations Issues and PRs that pertain to the organizations service. and removed bug Addresses a defect in current functionality. service/organizations Issues and PRs that pertain to the organizations service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Aug 18, 2023
Copy link
Member

@jar-b jar-b 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

--- PASS: TestAccOrganizations_serial (258.84s)
    --- PASS: TestAccOrganizations_serial/Organization (258.84s)
        --- PASS: TestAccOrganizations_serial/Organization/AwsServiceAccessPrincipals (38.64s)
        --- PASS: TestAccOrganizations_serial/Organization/EnabledPolicyTypes (104.17s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_ForcesNew (28.31s)
        --- PASS: TestAccOrganizations_serial/Organization/DataSource_basic (15.91s)
        --- SKIP: TestAccOrganizations_serial/Organization/DataSource_delegatedAdministrator (0.00s)
        --- PASS: TestAccOrganizations_serial/Organization/basic (16.53s)
        --- PASS: TestAccOrganizations_serial/Organization/disappears (12.44s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_Basic (15.87s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_Update (26.83s)
        --- SKIP: TestAccOrganizations_serial/Organization/DataSource_memberAccount (0.13s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/organizations      261.794s

@ewbankkit ewbankkit merged commit bac2dab into main Aug 18, 2023
59 checks passed
@ewbankkit ewbankkit deleted the b-aws_organizations_organization-import branch August 18, 2023 19:46
@github-actions github-actions bot added this to the v5.14.0 milestone Aug 18, 2023
github-actions bot pushed a commit that referenced this pull request Aug 18, 2023
@ewbankkit ewbankkit modified the milestones: v5.14.0, v5.13.1 Aug 18, 2023
@github-actions
Copy link

This functionality has been released in v5.13.1 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
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. 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]: current Organization ID (0-xxxxxxxxxx) does not match (r-xxxx)
3 participants