The govcloud arn should work just the same as pubcloud.
Actual Behavior
Terraform spits out a 400 error stating string validation error.
Relevant Error/Panic Output Snippet
│ Error: error creating Service Catalog Portfolio Share: ValidationException: 1 validation error detected: Value 'arn:aws-us-gov:organizations::REDACTED_ACCT_ID:organization/REDACTED_ORG_ID' at 'organizationNode.value' failed to satisfy constraint: Member must satisfy regular expression pattern: (^[0-9]{12}$)|(^arn:aws:organizations::\d{12}:organization\/o-[a-z0-9]{10,32})|(^o-[a-z0-9]{10,32}$)|(^arn:aws:organizations::\d{12}:ou\/o-[a-z0-9]{10,32}\/ou-[0-9a-z]{4,32}-[0-9a-z]{8,32}$)|(^ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}$)
│ status code: 400, request id: 91d16dcc-0a9a-4aff-9243-a0af4554dff1
Terraform Configuration Files
data "aws_organizations_organization" "org" {}
resource "aws_servicecatalog_portfolio_share" "backup_portfolio_share" {
principal_id = data.aws_organizations_organization.org.arn
portfolio_id = var.portfolio_id
type = "ORGANIZATION"
}
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.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.3.1
AWS Provider Version
4.11
Affected Resource(s)
The resource for sharing service catalog product's principal_id requires org arns to be ###:aws:##### whereas govcloud arns are ###:aws-us-gov:##### causing this share to not work for govcloud stating the arn is incorrect. This seems to be a hard requirement for string validation located here: https://github.com/hashicorp/terraform-provider-aws/blob/0a77465627efb9003f87978f901d1a4004a2fc09/internal/service/servicecatalog/portfolio_share.go#L57
Expected Behavior
The govcloud arn should work just the same as pubcloud.
Actual Behavior
Terraform spits out a 400 error stating string validation error.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform apply -f aws_service_catalog.tf
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None