-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New Resource: aws_fis_target_account_configuration #44870
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 Resource: aws_fis_target_account_configuration #44870
The head ref may contain hidden characters: "f\u2011fis\u2011target-account-configuration"
Conversation
Community GuidelinesThis 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
Pull Request Authors
|
|
✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible. |
|
Warning This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
Summary
Adds aws_fis_target_account_configuration to manage FIS target account configuration for multi‑account experiment templates. This wraps the AWS FIS CreateTargetAccountConfiguration API.
Motivation
FIS supports multi-account experiments where the template runs actions in additional AWS accounts. This resource registers a target account and the role FIS assumes to execute the experiment there.
Implementation
Resource: internal/service/fis/fis_target_account_configuration.go
Create: calls CreateTargetAccountConfiguration with ClientToken = id.UniqueId() for idempotency; sets composite ID <experiment_template_id>/<account_id>.
Read: calls GetTargetAccountConfiguration, updates state; clears state on ResourceNotFoundException.
Update: if description changes, reissues CreateTargetAccountConfiguration with the same IDs (idempotent in AWS) and new description; re-reads state.
Delete: calls DeleteTargetAccountConfiguration, tolerates already-deleted ResourceNotFoundException.
Import: supports composite ID <experiment_template_id>/<account_id>.
Timeouts: create/update/delete default 30m.
Registration: internal/service/fis/service_package_gen.go adds the resource factory for aws_fis_target_account_configuration.
Finder/waiters: helper functions use composite ID parsing and the FIS SDK v2 types.TargetAccountConfiguration.
Removed scaffold-only helpers; code uses only required logic.
Schema
account_id (Required, ForceNew)
experiment_template_id (Required, ForceNew)
role_arn (Required, ForceNew)
description (Optional)
Identity and Import
ID is <experiment_template_id>/<account_id>.
Import accepts the same composite ID.
Behavior Notes
Only required when experiment_options.account_targeting in the template is multi-account.
Update: only description is mutable; implemented via idempotent CreateTargetAccountConfiguration call (no dedicated Update API).
Not Found: ResourceNotFoundException removes the resource from state during Read and is ignored during Delete.
Tests
internal/service/fis/fis_target_account_configuration_test.go
Basic: provisions an experiment template + target account config, asserts fields, and verifies import.
Disappears: deletes target account configuration out of band and expects recreation on plan.
Description update: updates description and verifies state.
Exports: internal/service/fis/exports_test.go exposes FindTargetAccountConfigurationByID for tests.
Documentation
Canonical: website/docs/r/fis_target_account_configuration.html.markdown
Parallel: website/docs/r/fis_target_account_configuration.md
Legacy stub: website/docs/r/fis_fis_target_account_configuration.html.markdown (redirects readers to the new page)
Includes example usage, argument/attribute docs, import, timeouts, and a link to the AWS API docs.
Generation
Ran make gen to register resource and update generated files.
Manual Validation
Built provider locally and validated end-to-end using a sample Terraform config:
terraform init && terraform apply to create, then delete via console/CLI and re-plan to confirm recreation, then terraform destroy.
Checklist
New resource
Acceptance tests (basic, disappears, argument update)
Documentation
make gen, make fmt, make lint (note: local linter may require pinned Go version)
Unit tests pass (make test)
No breaking changes
Closes #44884