aws-ia / terraform-aws-control_tower_account_factory

AWS Control Tower Account Factory
Apache License 2.0
631 stars 420 forks source link

AFT re-invoke customization fails due to Invalid attribute #333

Closed Tmills89 closed 1 year ago

Tmills89 commented 1 year ago

Terraform Version & Prov:

AFT Version: 1.8.0

Terraform Version & Provider Versions Please provide the outputs of terraform version and terraform providers from within your AFT environment

terraform version

1.3.3

terraform providers

aws_provider = ">= 4.9.0, < 5.0.0"

Bug Description Global Customization fails due to Invalid attribute when re-invoking customization

To Reproduce Steps to reproduce the behavior:

  1. Go to Step Functions
  2. Click Start Execution
  3. { "include": [ { "type": "accounts", "target_value": [ ""] } ] }
  4. See error

Expected behavior Global Customization pipeline is executed against account

Related Logs

Handling errors: [{'status': '422', 'title': 'invalid attribute', 'detail': 'Name has already been taken', 'source': {'pointer': '/data/attributes/name'}}]

521 | Traceback (most recent call last): 522 | File "/codebuild/output/src077028438/src/aws-aft-core-framework/sources/scripts/workspace_manager.py", line 275, in 523 | setup_and_run_workspace( 524 | File "/codebuild/output/src077028438/src/aws-aft-core-framework/sources/scripts/workspace_manager.py", line 19, in setup_and_run_workspace 525 | workspace_id = setup_workspace( 526 | File "/codebuild/output/src077028438/src/aws-aft-core-framework/sources/scripts/workspace_manager.py", line 29, in setup_workspace 527 | workspace_id = terraform.create_workspace( 528 | File "/codebuild/output/src077028438/src/aws-aft-core-framework/sources/scripts/terraform_client.py", line 59, in create_workspace 529 | response = __post(endpoint, headers, payload) 530 | File "/codebuild/output/src077028438/src/aws-aft-core-framework/sources/scripts/terraform_client.py", line 215, in post 531 | handle_errors(response) 532 | File "/codebuild/output/src077028438/src/aws-aft-core-framework/sources/scripts/terraform_client.py", line 253, in __handle_errors 533 | raise ClientError(status=error["status"], message=error["title"]) 534 | terraform_client.ClientError: invalid attribute

snebhu3 commented 1 year ago

@Tmills89 thank you for reaching out. From the error message posted above there seems to be an issue within the workspace in the Terraform cloud environment. Please reach out to AWS Premium support in case you need help deep diving and troubleshooting the issue.

stumins commented 1 year ago

Resolving issue with recommendation for further support from AWS Premium Support. Please feel free to open a new issue if you uncover an issue with AFT while working with AWS Support.