Error setting Instance Profile on Instance when ARN contains multiple / in v3.29.0 #17719
Labels
bug
Addresses a defect in current functionality.
regression
Pertains to a degraded workflow resulting from an upstream patch or internal enhancement.
service/ec2
Issues and PRs that pertain to the ec2 service.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
v3.29.0 for AWS Provider
v0.14.5 for Terraform
Affected Resource(s)
aws_instance
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Creates instance with desired instance profile passed in by
var.instance_profile
Actual Behavior
Terraform apply fails with the following error:
Where
zzz
was the name passed in viavar.instance_profile
Steps to Reproduce
terraform apply
with an instance profile name that has an ARN with multiple/
afterinstance-profile
References
Poking around, I think this new function may be the culprit?
https://github.com/hashicorp/terraform-provider-aws/blob/main/aws/internal/service/iam/arn.go
I was able to reproduce the behavior pulling out that function, passing it an ARN that is formatted as above to re-create the same response.
The text was updated successfully, but these errors were encountered: