-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
IAM service-linked role creation fails for AWS China #10754
Comments
Hi @n1cholasgeorge 👋 Thank you for reporting this and sorry you ran into trouble with this resource. The errant validation logic can be found here: https://github.com/terraform-providers/terraform-provider-aws/blob/f39af7fff691603f5dc5b553c618d1dbdb6ea0df/aws/resource_aws_iam_service_linked_role.go#L31-L38 If someone is interested in fixing this, my recommendation would be either allow all known suffixes (such as AWS Commercial/GovCloud (US) ValidateFunc: func(v interface{}, k string) (ws []string, es []error) {
value := v.(string)
if !strings.Contains(value, ".") {
es = append(es, fmt.Errorf(
"%q must be a full service hostname e.g. elasticbeanstalk.amazonaws.com", k))
}
return
}, |
I'm going to close this issue due to inactivity (90 days without response ⏳ ). This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
…on to accept values in AWS partitions outside AWS Commercial and AWS GovCloud (US) Reference: #10754 Output from acceptance testing: ``` --- PASS: TestAccAWSIAMServiceLinkedRole_basic (23.90s) --- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix (24.77s) --- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix_DiffSuppressFunc (25.00s) --- PASS: TestAccAWSIAMServiceLinkedRole_Description (31.36s) ```
Submitted bug fix: #11919 |
…on to accept values in AWS partitions outside AWS Commercial and AWS GovCloud (US) (#11919) Reference: #10754 Output from acceptance testing: ``` --- PASS: TestAccAWSIAMServiceLinkedRole_basic (23.90s) --- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix (24.77s) --- PASS: TestAccAWSIAMServiceLinkedRole_CustomSuffix_DiffSuppressFunc (25.00s) --- PASS: TestAccAWSIAMServiceLinkedRole_Description (31.36s) ```
The fix for this has been merged and will release with version 2.52.0 of the Terraform AWS Provider, Thursday this week. |
This has been released in version 2.52.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Terraform v0.12.13
Affected Resource(s)
Terraform v0.12.13
Terraform Configuration Files
Debug Output
'''
https://gist.github.com/n1cholasgeorge/8dceb76d495784baeb54c19409ad3e5d
'''
Expected Behavior
Success
Actual Behavior
Error: "aws_service_name" must be a service URL e.g. elasticbeanstalk.amazonaws.com
Possibly due to the aws china endpoint address ending .com.cn
The text was updated successfully, but these errors were encountered: