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_ram_sharing_with_organization - new resource #25433

Merged
merged 21 commits into from
Aug 14, 2023

Conversation

owenfarrell
Copy link
Contributor

Community Note

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

Closes #25115

Output from acceptance testing:

$ make testacc TESTS='TestAccSharingWithOrganization_basic' PKG=ram
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 20 -run='TestAccSharingWithOrganization_basic'  -timeout 180m
=== RUN   TestAccSharingWithOrganization_basic
--- PASS: TestAccSharingWithOrganization_basic (73.35s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ram        82.571s

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/ram Issues and PRs that pertain to the ram service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 17, 2022
@owenfarrell owenfarrell force-pushed the ram_organizations branch 5 times, most recently from 33c890c to 542246a Compare June 17, 2022 13:44
@owenfarrell owenfarrell force-pushed the ram_organizations branch 3 times, most recently from 4035926 to 254cca3 Compare July 1, 2022 15:23
@AzySir
Copy link

AzySir commented Feb 9, 2023

Thanks for this @owenfarrell surprised to see no action on this after 7 months..

@bebold-jhr
Copy link

Yeah, sad to see that this PR has been stuck for so long although it has this many upvotes.

@github-actions github-actions bot added generators Relates to code generators. and removed provider Pertains to the provider itself, rather than any interaction with AWS. labels Apr 27, 2023
@owenfarrell
Copy link
Contributor Author

Rebased over a59ffd8. Made some updates to account for schema API changes for both resources and acceptance tests... but everything still passes okay.

@dzavalkin-scayle
Copy link

@breathingdust any chance this MR can be merged soon?

@breathingdust breathingdust added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jul 26, 2023
@ewbankkit ewbankkit added the new-resource Introduces a new resource. label Aug 14, 2023
@ewbankkit ewbankkit self-assigned this Aug 14, 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=TestAccRAMSharingWithOrganization_serial' PKG=ram
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 20  -run=TestAccRAMSharingWithOrganization_serial -timeout 180m
=== RUN   TestAccRAMSharingWithOrganization_serial
=== PAUSE TestAccRAMSharingWithOrganization_serial
=== CONT  TestAccRAMSharingWithOrganization_serial
=== RUN   TestAccRAMSharingWithOrganization_serial/basic
=== RUN   TestAccRAMSharingWithOrganization_serial/disappears
--- PASS: TestAccRAMSharingWithOrganization_serial (64.18s)
    --- PASS: TestAccRAMSharingWithOrganization_serial/basic (35.91s)
    --- PASS: TestAccRAMSharingWithOrganization_serial/disappears (28.28s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ram	69.670s
% make testacc TESTARGS='-run=TestAccIAMInstanceProfilesDataSource_\|TestAccIAMRoleDataSource_' PKG=iam ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 3  -run=TestAccIAMInstanceProfilesDataSource_\|TestAccIAMRoleDataSource_ -timeout 180m
=== RUN   TestAccIAMInstanceProfilesDataSource_basic
=== PAUSE TestAccIAMInstanceProfilesDataSource_basic
=== RUN   TestAccIAMRoleDataSource_basic
=== PAUSE TestAccIAMRoleDataSource_basic
=== RUN   TestAccIAMRoleDataSource_tags
=== PAUSE TestAccIAMRoleDataSource_tags
=== CONT  TestAccIAMInstanceProfilesDataSource_basic
=== CONT  TestAccIAMRoleDataSource_tags
=== CONT  TestAccIAMRoleDataSource_basic
--- PASS: TestAccIAMRoleDataSource_tags (27.66s)
--- PASS: TestAccIAMRoleDataSource_basic (27.69s)
--- PASS: TestAccIAMInstanceProfilesDataSource_basic (27.87s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	33.231s
% make testacc TESTARGS='-run=TestAccIAMRole_' PKG=iam ACCTEST_PARALLELISM=3 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 3  -run=TestAccIAMRole_ -timeout 180m
=== RUN   TestAccIAMRole_basic
=== PAUSE TestAccIAMRole_basic
=== RUN   TestAccIAMRole_description
=== PAUSE TestAccIAMRole_description
=== RUN   TestAccIAMRole_nameGenerated
=== PAUSE TestAccIAMRole_nameGenerated
=== RUN   TestAccIAMRole_namePrefix
=== PAUSE TestAccIAMRole_namePrefix
=== RUN   TestAccIAMRole_testNameChange
=== PAUSE TestAccIAMRole_testNameChange
=== RUN   TestAccIAMRole_diffs
=== PAUSE TestAccIAMRole_diffs
=== RUN   TestAccIAMRole_diffsCondition
=== PAUSE TestAccIAMRole_diffsCondition
=== RUN   TestAccIAMRole_badJSON
=== PAUSE TestAccIAMRole_badJSON
=== RUN   TestAccIAMRole_disappears
=== PAUSE TestAccIAMRole_disappears
=== RUN   TestAccIAMRole_policiesForceDetach
=== PAUSE TestAccIAMRole_policiesForceDetach
=== RUN   TestAccIAMRole_maxSessionDuration
=== PAUSE TestAccIAMRole_maxSessionDuration
=== RUN   TestAccIAMRole_permissionsBoundary
=== PAUSE TestAccIAMRole_permissionsBoundary
=== RUN   TestAccIAMRole_tags
=== PAUSE TestAccIAMRole_tags
=== RUN   TestAccIAMRole_InlinePolicy_basic
=== PAUSE TestAccIAMRole_InlinePolicy_basic
=== RUN   TestAccIAMRole_InlinePolicy_ignoreOrder
=== PAUSE TestAccIAMRole_InlinePolicy_ignoreOrder
=== RUN   TestAccIAMRole_InlinePolicy_empty
=== PAUSE TestAccIAMRole_InlinePolicy_empty
=== RUN   TestAccIAMRole_ManagedPolicy_basic
=== PAUSE TestAccIAMRole_ManagedPolicy_basic
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
=== CONT  TestAccIAMRole_basic
=== CONT  TestAccIAMRole_InlinePolicy_basic
=== CONT  TestAccIAMRole_badJSON
--- PASS: TestAccIAMRole_badJSON (4.00s)
=== CONT  TestAccIAMRole_testNameChange
--- PASS: TestAccIAMRole_basic (26.69s)
=== CONT  TestAccIAMRole_diffsCondition
--- PASS: TestAccIAMRole_testNameChange (42.37s)
=== CONT  TestAccIAMRole_diffs
--- PASS: TestAccIAMRole_InlinePolicy_basic (63.71s)
=== CONT  TestAccIAMRole_nameGenerated
--- PASS: TestAccIAMRole_nameGenerated (26.69s)
=== CONT  TestAccIAMRole_namePrefix
--- PASS: TestAccIAMRole_namePrefix (26.72s)
=== CONT  TestAccIAMRole_maxSessionDuration
--- PASS: TestAccIAMRole_diffsCondition (98.77s)
=== CONT  TestAccIAMRole_tags
--- PASS: TestAccIAMRole_maxSessionDuration (57.83s)
=== CONT  TestAccIAMRole_permissionsBoundary
--- PASS: TestAccIAMRole_tags (49.51s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (48.03s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (47.97s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMRole_permissionsBoundary (113.98s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (47.86s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (45.80s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (67.21s)
=== CONT  TestAccIAMRole_ManagedPolicy_basic
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (51.51s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (54.75s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== CONT  TestAccIAMRole_InlinePolicy_empty
--- PASS: TestAccIAMRole_diffs (401.98s)
--- PASS: TestAccIAMRole_ManagedPolicy_basic (81.71s)
=== CONT  TestAccIAMRole_policiesForceDetach
--- PASS: TestAccIAMRole_InlinePolicy_empty (27.00s)
=== CONT  TestAccIAMRole_InlinePolicy_ignoreOrder
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (50.76s)
=== CONT  TestAccIAMRole_disappears
--- PASS: TestAccIAMRole_policiesForceDetach (31.33s)
=== CONT  TestAccIAMRole_description
--- PASS: TestAccIAMRole_disappears (25.20s)
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (65.52s)
--- PASS: TestAccIAMRole_description (62.28s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	566.307s
% make testacc TESTARGS='-run=TestAccIAMServiceLinkedRole_' PKG=iam ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 3  -run=TestAccIAMServiceLinkedRole_ -timeout 180m
=== RUN   TestAccIAMServiceLinkedRole_basic
=== PAUSE TestAccIAMServiceLinkedRole_basic
=== RUN   TestAccIAMServiceLinkedRole_customSuffix
=== PAUSE TestAccIAMServiceLinkedRole_customSuffix
=== RUN   TestAccIAMServiceLinkedRole_CustomSuffix_diffSuppressFunc
=== PAUSE TestAccIAMServiceLinkedRole_CustomSuffix_diffSuppressFunc
=== RUN   TestAccIAMServiceLinkedRole_description
=== PAUSE TestAccIAMServiceLinkedRole_description
=== RUN   TestAccIAMServiceLinkedRole_tags
=== PAUSE TestAccIAMServiceLinkedRole_tags
=== RUN   TestAccIAMServiceLinkedRole_disappears
=== PAUSE TestAccIAMServiceLinkedRole_disappears
=== CONT  TestAccIAMServiceLinkedRole_basic
=== CONT  TestAccIAMServiceLinkedRole_description
=== CONT  TestAccIAMServiceLinkedRole_CustomSuffix_diffSuppressFunc
--- PASS: TestAccIAMServiceLinkedRole_CustomSuffix_diffSuppressFunc (37.46s)
=== CONT  TestAccIAMServiceLinkedRole_customSuffix
--- PASS: TestAccIAMServiceLinkedRole_basic (37.47s)
=== CONT  TestAccIAMServiceLinkedRole_disappears
--- PASS: TestAccIAMServiceLinkedRole_description (53.86s)
=== CONT  TestAccIAMServiceLinkedRole_tags
--- PASS: TestAccIAMServiceLinkedRole_disappears (32.01s)
--- PASS: TestAccIAMServiceLinkedRole_customSuffix (37.44s)
--- PASS: TestAccIAMServiceLinkedRole_tags (67.19s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	126.229s
% 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_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/disappears
=== RUN   TestAccOrganizations_serial/Organization/EnabledPolicyTypes
=== RUN   TestAccOrganizations_serial/Organization/FeatureSet_Basic
=== RUN   TestAccOrganizations_serial/Organization/FeatureSet_ForcesNew
=== 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/basic
=== RUN   TestAccOrganizations_serial/Organization/AwsServiceAccessPrincipals
=== RUN   TestAccOrganizations_serial/Organization/FeatureSet_Update
=== RUN   TestAccOrganizations_serial/Organization/DataSource_basic
--- PASS: TestAccOrganizations_serial (390.76s)
    --- PASS: TestAccOrganizations_serial/Organization (388.30s)
        --- SKIP: TestAccOrganizations_serial/Organization/DataSource_delegatedAdministrator (0.47s)
        --- PASS: TestAccOrganizations_serial/Organization/disappears (19.47s)
        --- PASS: TestAccOrganizations_serial/Organization/EnabledPolicyTypes (155.84s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_Basic (23.41s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_ForcesNew (43.42s)
        --- SKIP: TestAccOrganizations_serial/Organization/DataSource_memberAccount (0.11s)
        --- PASS: TestAccOrganizations_serial/Organization/basic (24.11s)
        --- PASS: TestAccOrganizations_serial/Organization/AwsServiceAccessPrincipals (57.53s)
        --- PASS: TestAccOrganizations_serial/Organization/FeatureSet_Update (40.46s)
        --- PASS: TestAccOrganizations_serial/Organization/DataSource_basic (23.47s)
PASS
PASS	github.com/hashicorp/terraform-provider-aws/internal/service/organizations	392.314s

@ewbankkit
Copy link
Contributor

@owenfarrell Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 4cb1730 into hashicorp:main Aug 14, 2023
41 checks passed
@github-actions github-actions bot added this to the v5.13.0 milestone Aug 14, 2023
@owenfarrell owenfarrell deleted the ram_organizations branch August 16, 2023 02:31
@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. generators Relates to code generators. new-resource Introduces a new resource. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/ram Issues and PRs that pertain to the ram service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable resource sharing within AWS Organizations for RAM
6 participants