You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.
Terraform CLI and Terraform AWS Cloud Control Provider Version
This boils down to duplicate resources with the same name. The following example will attempt to create the same IAM role with identifier test-role.
resource"awscc_iam_role""delete_resource" {
role_name="test-role"assume_role_policy_document=jsonencode({
Version ="2012-10-17"
Statement = [
{
Action ="sts:AssumeRole"
Effect ="Allow"
Principal = {
Service ="lambda.amazonaws.com"
}
},
]
})
}
resource"awscc_iam_role""review_resource" {
role_name="test-role"assume_role_policy_document=jsonencode({
Version ="2012-10-17"
Statement = [
{
Action ="sts:AssumeRole"
Effect ="Allow"
Principal = {
Service ="lambda.amazonaws.com"
}
},
]
})
}
The first execution of the above configuration will fail with the ConcurrentOperationException. CCAPI prevented the user from creating a duplicate resource, although the error doesn't clearly state that. The second Terraform apply will return a user friendly error 'AWS::IAM::Role' with identifier 'test-role' already exists..
One could force Terraform to show a successful plan by using -target and apply only one role. Downside to this is the second apply sees the first role as tainted and replaces it. When all said and done Terraform thinks it's managing two resources in CCAPI, but only one exists within AWS.
Community Note
Terraform CLI and Terraform AWS Cloud Control Provider Version
Affected Resource(s)
Terraform Configuration Files
The configuration being deployed is the Terraform code contained in https://github.com/aws-samples/generate-awscc-with-bedrock-claude-computer-use/tree/main/terraform.
Debug Output
The debug output shows
Panic Output
Expected Behavior
The stack of resources specified in the configuration should be provisioned.
Actual Behavior
The resource provisioning fails with the following message
Steps to Reproduce
git clone https://github.com/aws-samples/generate-awscc-with-bedrock-claude-computer-use
cd terraform
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: