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

New resources: aws_iot_thing_group and aws_iot_thing_group_membership #21799

Merged
merged 28 commits into from
Nov 18, 2021

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Nov 16, 2021

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 #8801.
Closes #10632.
Relates #16863.
Relates #10634.

Output from acceptance testing:

Commercial

% make testacc PKG_NAME=internal/service/iot TESTARGS='-run=TestAccIoTThingGroup_'           
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run=TestAccIoTThingGroup_ -timeout 180m
=== RUN   TestAccIoTThingGroup_basic
=== PAUSE TestAccIoTThingGroup_basic
=== RUN   TestAccIoTThingGroup_disappears
=== PAUSE TestAccIoTThingGroup_disappears
=== RUN   TestAccIoTThingGroup_tags
=== PAUSE TestAccIoTThingGroup_tags
=== RUN   TestAccIoTThingGroup_parentGroup
=== PAUSE TestAccIoTThingGroup_parentGroup
=== RUN   TestAccIoTThingGroup_properties
=== PAUSE TestAccIoTThingGroup_properties
=== CONT  TestAccIoTThingGroup_basic
=== CONT  TestAccIoTThingGroup_parentGroup
=== CONT  TestAccIoTThingGroup_tags
=== CONT  TestAccIoTThingGroup_disappears
=== CONT  TestAccIoTThingGroup_properties
--- PASS: TestAccIoTThingGroup_disappears (12.03s)
--- PASS: TestAccIoTThingGroup_basic (16.63s)
--- PASS: TestAccIoTThingGroup_parentGroup (22.57s)
--- PASS: TestAccIoTThingGroup_properties (27.33s)
--- PASS: TestAccIoTThingGroup_tags (37.49s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	40.876s
% make testacc PKG_NAME=internal/service/iot TESTARGS='-run=TestAccIoTThingGroupMembership_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run=TestAccIoTThingGroupMembership_ -timeout 180m
=== RUN   TestAccIoTThingGroupMembership_basic
=== PAUSE TestAccIoTThingGroupMembership_basic
=== RUN   TestAccIoTThingGroupMembership_disappears
=== PAUSE TestAccIoTThingGroupMembership_disappears
=== RUN   TestAccIoTThingGroupMembership_disappears_Thing
=== PAUSE TestAccIoTThingGroupMembership_disappears_Thing
=== RUN   TestAccIoTThingGroupMembership_disappears_ThingGroup
=== PAUSE TestAccIoTThingGroupMembership_disappears_ThingGroup
=== RUN   TestAccIoTThingGroupMembership_overrideDynamicGroup
=== PAUSE TestAccIoTThingGroupMembership_overrideDynamicGroup
=== CONT  TestAccIoTThingGroupMembership_basic
=== CONT  TestAccIoTThingGroupMembership_disappears_ThingGroup
=== CONT  TestAccIoTThingGroupMembership_disappears
=== CONT  TestAccIoTThingGroupMembership_disappears_Thing
=== CONT  TestAccIoTThingGroupMembership_overrideDynamicGroup
--- PASS: TestAccIoTThingGroupMembership_disappears_ThingGroup (17.77s)
--- PASS: TestAccIoTThingGroupMembership_disappears_Thing (18.04s)
--- PASS: TestAccIoTThingGroupMembership_disappears (18.12s)
--- PASS: TestAccIoTThingGroupMembership_basic (19.60s)
--- PASS: TestAccIoTThingGroupMembership_overrideDynamicGroup (20.06s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	23.479s

GovCloud

% make testacc PKG_NAME=internal/service/iot TESTARGS='-run=TestAccIoTThingGroup_\|TestAccIoTThingGroupMembership_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run=TestAccIoTThingGroup_\|TestAccIoTThingGroupMembership_ -timeout 180m
=== RUN   TestAccIoTThingGroupMembership_basic
=== PAUSE TestAccIoTThingGroupMembership_basic
=== RUN   TestAccIoTThingGroupMembership_disappears
=== PAUSE TestAccIoTThingGroupMembership_disappears
=== RUN   TestAccIoTThingGroupMembership_disappears_Thing
=== PAUSE TestAccIoTThingGroupMembership_disappears_Thing
=== RUN   TestAccIoTThingGroupMembership_disappears_ThingGroup
=== PAUSE TestAccIoTThingGroupMembership_disappears_ThingGroup
=== RUN   TestAccIoTThingGroupMembership_overrideDynamicGroup
=== PAUSE TestAccIoTThingGroupMembership_overrideDynamicGroup
=== RUN   TestAccIoTThingGroup_basic
=== PAUSE TestAccIoTThingGroup_basic
=== RUN   TestAccIoTThingGroup_disappears
=== PAUSE TestAccIoTThingGroup_disappears
=== RUN   TestAccIoTThingGroup_tags
=== PAUSE TestAccIoTThingGroup_tags
=== RUN   TestAccIoTThingGroup_parentGroup
=== PAUSE TestAccIoTThingGroup_parentGroup
=== RUN   TestAccIoTThingGroup_properties
=== PAUSE TestAccIoTThingGroup_properties
=== CONT  TestAccIoTThingGroupMembership_basic
=== CONT  TestAccIoTThingGroup_disappears
=== CONT  TestAccIoTThingGroup_properties
=== CONT  TestAccIoTThingGroupMembership_disappears_ThingGroup
=== CONT  TestAccIoTThingGroup_basic
=== CONT  TestAccIoTThingGroupMembership_overrideDynamicGroup
=== CONT  TestAccIoTThingGroup_parentGroup
=== CONT  TestAccIoTThingGroupMembership_disappears_Thing
=== CONT  TestAccIoTThingGroup_tags
=== CONT  TestAccIoTThingGroupMembership_disappears
--- PASS: TestAccIoTThingGroup_disappears (20.90s)
--- PASS: TestAccIoTThingGroupMembership_disappears_ThingGroup (25.52s)
--- PASS: TestAccIoTThingGroupMembership_disappears_Thing (25.96s)
--- PASS: TestAccIoTThingGroupMembership_disappears (26.00s)
--- PASS: TestAccIoTThingGroup_basic (28.58s)
--- PASS: TestAccIoTThingGroupMembership_overrideDynamicGroup (29.29s)
--- PASS: TestAccIoTThingGroupMembership_basic (29.40s)
--- PASS: TestAccIoTThingGroup_parentGroup (35.47s)
--- PASS: TestAccIoTThingGroup_properties (44.54s)
--- PASS: TestAccIoTThingGroup_tags (57.49s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	60.877s

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. pre-service-packages Includes pre-Service Packages aspects. service/iot Issues and PRs that pertain to the iot service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 16, 2021
@ewbankkit ewbankkit added this to the Roadmap milestone Nov 16, 2021
@ewbankkit ewbankkit changed the title New resources: aws_iot_thing_group and aws_iot_thing_group_member New resources: aws_iot_thing_group and aws_iot_thing_group_membership Nov 16, 2021
@ewbankkit ewbankkit force-pushed the f-r/aws_iot_thing_group+aws_iot_thing_group_member branch from 162f871 to 5f7ab6c Compare November 16, 2021 20:39
@github-actions github-actions bot added provider Pertains to the provider itself, rather than any interaction with AWS. and removed provider Pertains to the provider itself, rather than any interaction with AWS. pre-service-packages Includes pre-Service Packages aspects. labels Nov 16, 2021
@github-actions github-actions bot added provider Pertains to the provider itself, rather than any interaction with AWS. service/s3control Issues and PRs that pertain to the s3control service. sweeper Pertains to changes to or issues with the sweeper. and removed service/s3control Issues and PRs that pertain to the s3control service. labels Nov 17, 2021
Acceptance test output:

% make testacc PKG_NAME=internal/service/iot TESTARGS='-run=TestAccIoTThingGroup_basic\|TestAccIoTThingGroup_disappears'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run=TestAccIoTThingGroup_basic\|TestAccIoTThingGroup_disappears -timeout 180m
=== RUN   TestAccIoTThingGroup_basic
=== PAUSE TestAccIoTThingGroup_basic
=== RUN   TestAccIoTThingGroup_disappears
=== PAUSE TestAccIoTThingGroup_disappears
=== CONT  TestAccIoTThingGroup_basic
=== CONT  TestAccIoTThingGroup_disappears
--- PASS: TestAccIoTThingGroup_disappears (12.92s)
--- PASS: TestAccIoTThingGroup_basic (17.35s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	20.592s
Acceptance test output:

% make testacc PKG_NAME=internal/service/iot TESTARGS='-run=TestAccIoTThingGroup_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run=TestAccIoTThingGroup_ -timeout 180m
=== RUN   TestAccIoTThingGroup_basic
=== PAUSE TestAccIoTThingGroup_basic
=== RUN   TestAccIoTThingGroup_disappears
=== PAUSE TestAccIoTThingGroup_disappears
=== RUN   TestAccIoTThingGroup_tags
=== PAUSE TestAccIoTThingGroup_tags
=== RUN   TestAccIoTThingGroup_parentGroup
=== PAUSE TestAccIoTThingGroup_parentGroup
=== RUN   TestAccIoTThingGroup_properties
=== PAUSE TestAccIoTThingGroup_properties
=== CONT  TestAccIoTThingGroup_basic
=== CONT  TestAccIoTThingGroup_parentGroup
=== CONT  TestAccIoTThingGroup_tags
=== CONT  TestAccIoTThingGroup_disappears
=== CONT  TestAccIoTThingGroup_properties
--- PASS: TestAccIoTThingGroup_disappears (12.03s)
--- PASS: TestAccIoTThingGroup_basic (16.63s)
--- PASS: TestAccIoTThingGroup_parentGroup (22.57s)
--- PASS: TestAccIoTThingGroup_properties (27.33s)
--- PASS: TestAccIoTThingGroup_tags (37.49s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	40.876s
% make sweep SWEEPARGS=-sweep-run=aws_iot_thing_group SWEEP=us-west-2,us-west-1,us-east-2,us-east-1
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./internal/sweep -v -tags=sweep -sweep=us-west-2,us-west-1,us-east-2,us-east-1 -sweep-run=aws_iot_thing_group -timeout 60m
2021/11/18 12:33:56 [DEBUG] Running Sweepers for region (us-west-2):
2021/11/18 12:33:56 [DEBUG] Running Sweeper (aws_iot_policy_attachment) in region (us-west-2)
2021/11/18 12:33:56 [INFO] AWS Auth provider used: "EnvProvider"
2021/11/18 12:33:56 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/11/18 12:33:57 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-6195811425314339175
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-5646206226315228557-grandparent
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-8885168906862677607-grandparent
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-4304961202836791216-parent
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-4304961202836791216-grandparent
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-5271273544858748970
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-1002360090986675451
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-2131691615459568451-parent
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-3663987710321595284-grandparent
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-8885676072754895414
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-1750511564291611981
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-3663987710321595284-parent
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-4237496326368319094-grandparent
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-2131691615459568451-grandparent
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-4237496326368319094-parent
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [DEBUG] Deleting IoT Thing Group: tf-acc-test-3339897176340297276
2021/11/18 12:33:58 [DEBUG] Waiting for state to become: [success]
2021/11/18 12:33:58 [TRACE] Waiting 500ms before next try
2021/11/18 12:33:58 [TRACE] Waiting 500ms before next try
2021/11/18 12:33:58 [TRACE] Waiting 500ms before next try
2021/11/18 12:33:58 [TRACE] Waiting 500ms before next try
2021/11/18 12:34:00 [DEBUG] Completed Sweeper (aws_iot_policy_attachment) in region (us-west-2) in 3.72332801s
2021/11/18 12:34:00 Completed Sweepers for region (us-west-2) in 3.723518398s
2021/11/18 12:34:00 Sweeper Tests for region (us-west-2) ran successfully:
	- aws_iot_policy_attachment
2021/11/18 12:34:00 [DEBUG] Running Sweepers for region (us-west-1):
2021/11/18 12:34:00 [DEBUG] Running Sweeper (aws_iot_policy_attachment) in region (us-west-1)
2021/11/18 12:34:00 [INFO] AWS Auth provider used: "EnvProvider"
2021/11/18 12:34:00 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/11/18 12:34:00 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/11/18 12:34:02 [DEBUG] Completed Sweeper (aws_iot_policy_attachment) in region (us-west-1) in 2.318537361s
2021/11/18 12:34:02 Completed Sweepers for region (us-west-1) in 2.318572572s
2021/11/18 12:34:02 Sweeper Tests for region (us-west-1) ran successfully:
	- aws_iot_policy_attachment
2021/11/18 12:34:02 [DEBUG] Running Sweepers for region (us-east-2):
2021/11/18 12:34:02 [DEBUG] Running Sweeper (aws_iot_policy_attachment) in region (us-east-2)
2021/11/18 12:34:02 [INFO] AWS Auth provider used: "EnvProvider"
2021/11/18 12:34:02 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/11/18 12:34:03 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/11/18 12:34:03 [DEBUG] Completed Sweeper (aws_iot_policy_attachment) in region (us-east-2) in 879.478468ms
2021/11/18 12:34:03 Completed Sweepers for region (us-east-2) in 879.504201ms
2021/11/18 12:34:03 Sweeper Tests for region (us-east-2) ran successfully:
	- aws_iot_policy_attachment
2021/11/18 12:34:03 [DEBUG] Running Sweepers for region (us-east-1):
2021/11/18 12:34:03 [DEBUG] Running Sweeper (aws_iot_policy_attachment) in region (us-east-1)
2021/11/18 12:34:03 [INFO] AWS Auth provider used: "EnvProvider"
2021/11/18 12:34:03 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/11/18 12:34:03 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/11/18 12:34:04 [DEBUG] Completed Sweeper (aws_iot_policy_attachment) in region (us-east-1) in 507.701903ms
2021/11/18 12:34:04 Completed Sweepers for region (us-east-1) in 507.729908ms
2021/11/18 12:34:04 Sweeper Tests for region (us-east-1) ran successfully:
	- aws_iot_policy_attachment
ok  	github.com/hashicorp/terraform-provider-aws/internal/sweep	13.481s
This reverts commit 08b7fe6.
Acceptance test output:

% make testacc PKG_NAME=internal/service/iot TESTARGS='-run=TestAccIoTThingGroupMembership_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run=TestAccIoTThingGroupMembership_ -timeout 180m
=== RUN   TestAccIoTThingGroupMembership_basic
=== PAUSE TestAccIoTThingGroupMembership_basic
=== RUN   TestAccIoTThingGroupMembership_disappears
=== PAUSE TestAccIoTThingGroupMembership_disappears
=== RUN   TestAccIoTThingGroupMembership_disappears_Thing
=== PAUSE TestAccIoTThingGroupMembership_disappears_Thing
=== RUN   TestAccIoTThingGroupMembership_disappears_ThingGroup
=== PAUSE TestAccIoTThingGroupMembership_disappears_ThingGroup
=== RUN   TestAccIoTThingGroupMembership_overrideDynamicGroup
=== PAUSE TestAccIoTThingGroupMembership_overrideDynamicGroup
=== CONT  TestAccIoTThingGroupMembership_basic
=== CONT  TestAccIoTThingGroupMembership_disappears_ThingGroup
=== CONT  TestAccIoTThingGroupMembership_disappears
=== CONT  TestAccIoTThingGroupMembership_disappears_Thing
=== CONT  TestAccIoTThingGroupMembership_overrideDynamicGroup
--- PASS: TestAccIoTThingGroupMembership_disappears_ThingGroup (17.77s)
--- PASS: TestAccIoTThingGroupMembership_disappears_Thing (18.04s)
--- PASS: TestAccIoTThingGroupMembership_disappears (18.12s)
--- PASS: TestAccIoTThingGroupMembership_basic (19.60s)
--- PASS: TestAccIoTThingGroupMembership_overrideDynamicGroup (20.06s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iot	23.479s
@ewbankkit ewbankkit force-pushed the f-r/aws_iot_thing_group+aws_iot_thing_group_member branch from 81a6c1d to d612967 Compare November 18, 2021 20:58
@ewbankkit ewbankkit marked this pull request as ready for review November 18, 2021 20:58
@ewbankkit ewbankkit merged commit 63e7a6d into main Nov 18, 2021
@ewbankkit ewbankkit deleted the f-r/aws_iot_thing_group+aws_iot_thing_group_member branch November 18, 2021 22:04
@github-actions github-actions bot modified the milestones: Roadmap, v3.66.0 Nov 18, 2021
@github-actions
Copy link

This functionality has been released in v3.66.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

github-actions bot commented Jun 9, 2022

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 Jun 9, 2022
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. provider Pertains to the provider itself, rather than any interaction with AWS. service/iot Issues and PRs that pertain to the iot service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. 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.

Add iot thing attach to iot thing group resource Add IoT Thing Group
4 participants