Skip to content

aws_resiliencehubv2_service: Add 'associated_system' configuration block - #49498

Open
hwkiem wants to merge 1 commit into
hashicorp:mainfrom
hwkiem:claude/resiliencehub-v2-service-system-9d20c4
Open

aws_resiliencehubv2_service: Add 'associated_system' configuration block#49498
hwkiem wants to merge 1 commit into
hashicorp:mainfrom
hwkiem:claude/resiliencehub-v2-service-system-9d20c4

Conversation

@hwkiem

@hwkiem hwkiem commented Aug 14, 2026

Copy link
Copy Markdown

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

No changes to security controls in this pull request.

Description

Adds the associated_system configuration block to the aws_resiliencehubv2_service resource, and the matching computed attribute to its data source, so a service can be associated with a system.

The API has no Associate* operation — the relationship is a field on the service (AssociatedSystems on CreateService/UpdateService), so it is modelled as an argument, like the existing policy_arn.

Notes for reviewers:

  • UpdateService treats an omitted AssociatedSystems as "no change", so Update sends an explicitly empty list when the last block is removed. Without this, removing every block applies cleanly but leaves the systems associated in AWS, and the next refresh plans them straight back — verified against the API, and covered by the third step of TestAccResilienceHubV2Service_associatedSystem.
  • AssociatedSystem.UserJourneyIds is deferred until aws_resiliencehubv2_user_journey (F resiliencehubv2 user journey #48330) lands. Using a block rather than a flat set of ARNs keeps adding it additive.
  • The aws_resiliencehubv2_system sweeper now depends on the service sweeper, since DeleteSystem can fail while an associated service exists.

I understand the author of #48330 may intend to cover system association there. As of its current diff that PR does not touch AssociatedSystems, so this is raised to be taken or left as the maintainers prefer — happy to close it if it is better folded into the user journey work.

Relations

Closes #49475
Relates #48122
Relates #48330

References

Output from Acceptance Testing

% make testacc TESTS=TestAccResilienceHubV2Service_ PKG=resiliencehubv2
TF_ACC=1 go1.26.5 test ./internal/service/resiliencehubv2/... -v -count 1 -parallel 20 -run='TestAccResilienceHubV2Service_'  -timeout 360m -vet=off -buildvcs=false
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_nullNonOverlappingResourceTag (63.39s)
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_nullOverlappingResourceTag (63.59s)
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_emptyProviderOnlyTag (63.65s)
--- PASS: TestAccResilienceHubV2Service_disappears (82.96s)
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_emptyResourceTag (88.47s)
--- PASS: TestAccResilienceHubV2Service_policyARN (89.21s)
--- PASS: TestAccResilienceHubV2Service_Tags_ComputedTag_onCreate (94.45s)
--- PASS: TestAccResilienceHubV2Service_regions (95.58s)
--- PASS: TestAccResilienceHubV2Service_Tags_ComputedTag_OnUpdate_replace (101.68s)
--- PASS: TestAccResilienceHubV2Service_Tags_EmptyTag_OnUpdate_replace (110.87s)
--- PASS: TestAccResilienceHubV2Service_Tags_ComputedTag_OnUpdate_add (111.17s)
--- PASS: TestAccResilienceHubV2Service_Identity_basic (120.40s)
--- PASS: TestAccResilienceHubV2Service_dependencyDiscovery (123.10s)
--- PASS: TestAccResilienceHubV2Service_kmsKeyID (59.75s)
--- PASS: TestAccResilienceHubV2Service_description (123.79s)
--- PASS: TestAccResilienceHubV2Service_associatedSystem (134.71s)
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_updateToResourceOnly (135.82s)
--- PASS: TestAccResilienceHubV2Service_Tags_null (72.84s)
--- PASS: TestAccResilienceHubV2Service_Tags_IgnoreTags_Overlap_resourceTag (140.15s)
--- PASS: TestAccResilienceHubV2Service_List_includeResource (53.77s)
--- PASS: TestAccResilienceHubV2Service_List_regionOverride (46.62s)
--- PASS: TestAccResilienceHubV2Service_Tags_IgnoreTags_Overlap_defaultTag (149.38s)
--- PASS: TestAccResilienceHubV2Service_Tags_emptyMap (62.59s)
--- PASS: TestAccResilienceHubV2Service_List_basic (42.16s)
--- PASS: TestAccResilienceHubV2Service_basic (48.15s)
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_nonOverlapping (171.43s)
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_overlapping (171.50s)
--- PASS: TestAccResilienceHubV2Service_Tags_addOnUpdate (84.16s)
--- PASS: TestAccResilienceHubV2Service_Tags_EmptyTag_onCreate (90.76s)
--- PASS: TestAccResilienceHubV2Service_Tags_EmptyTag_OnUpdate_add (117.14s)
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_updateToProviderOnly (70.13s)
--- PASS: TestAccResilienceHubV2Service_Identity_regionOverride (65.90s)
--- PASS: TestAccResilienceHubV2Service_tags (113.81s)
--- PASS: TestAccResilienceHubV2Service_Tags_DefaultTags_providerOnly (107.44s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/resiliencehubv2	223.688s

@github-actions

Copy link
Copy Markdown
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • 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 needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. sweeper Pertains to changes to or issues with the sweeper. service/resiliencehubv2 Issues and PRs that pertain to the resiliencehubv2 service. size/L Managed by automation to categorize the size of a PR. labels Aug 14, 2026
@hwkiem
hwkiem force-pushed the claude/resiliencehub-v2-service-system-9d20c4 branch from 4293277 to 54ec4b0 Compare August 14, 2026 16:05
@hwkiem hwkiem changed the title r/aws_resiliencehubv2_service: Add 'associated_system' configuration block aws_resiliencehubv2_service: Add 'associated_system' configuration block Aug 14, 2026
@hwkiem
hwkiem force-pushed the claude/resiliencehub-v2-service-system-9d20c4 branch from 54ec4b0 to 0d57359 Compare August 14, 2026 16:06
@hwkiem
hwkiem marked this pull request as ready for review August 14, 2026 16:32
@hwkiem
hwkiem requested a review from a team as a code owner August 14, 2026 16:32
@dosubot dosubot Bot added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 14, 2026
@hwkiem
hwkiem force-pushed the claude/resiliencehub-v2-service-system-9d20c4 branch from 0d57359 to e367981 Compare August 14, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. service/resiliencehubv2 Issues and PRs that pertain to the resiliencehubv2 service. size/L 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.

[Enhancement]: aws_resiliencehubv2_service - support associating a service with a system.

1 participant