Open Monster-Zhu opened 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
Hi @Monster-Zhu,
I had a look into the issue you described and the current provider code.
Here you can see the validation that happens for the vpc_region
. Internally your provided value cn-northwest-1
will be checked against the contents of the awstypes.VPCRegion
.
awstypes.VPCRegion
is imported from the AWS Go SDK v2 and it seems that support is missing there. You can find the latest docs here.
The content is as below (VPCRegionCnNorth1
for cn-north-1
is part, an entry for cn-northwest-1
is missing)
type VPCRegion [string](https://pkg.go.dev/builtin#string)
const (
VPCRegionUsEast1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-east-1"
VPCRegionUsEast2 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-east-2"
VPCRegionUsWest1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-west-1"
VPCRegionUsWest2 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-west-2"
VPCRegionEuWest1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "eu-west-1"
VPCRegionEuWest2 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "eu-west-2"
VPCRegionEuWest3 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "eu-west-3"
VPCRegionEuCentral1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "eu-central-1"
VPCRegionEuCentral2 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "eu-central-2"
VPCRegionApEast1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-east-1"
VPCRegionMeSouth1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "me-south-1"
VPCRegionUsGovWest1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-gov-west-1"
VPCRegionUsGovEast1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-gov-east-1"
VPCRegionUsIsoEast1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-iso-east-1"
VPCRegionUsIsoWest1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-iso-west-1"
VPCRegionUsIsobEast1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "us-isob-east-1"
VPCRegionMeCentral1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "me-central-1"
VPCRegionApSoutheast1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-southeast-1"
VPCRegionApSoutheast2 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-southeast-2"
VPCRegionApSoutheast3 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-southeast-3"
VPCRegionApSouth1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-south-1"
VPCRegionApSouth2 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-south-2"
VPCRegionApNortheast1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-northeast-1"
VPCRegionApNortheast2 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-northeast-2"
VPCRegionApNortheast3 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-northeast-3"
VPCRegionEuNorth1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "eu-north-1"
VPCRegionSaEast1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "sa-east-1"
VPCRegionCaCentral1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ca-central-1"
VPCRegionCnNorth1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "cn-north-1"
VPCRegionAfSouth1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "af-south-1"
VPCRegionEuSouth1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "eu-south-1"
VPCRegionEuSouth2 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "eu-south-2"
VPCRegionApSoutheast4 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ap-southeast-4"
VPCRegionIlCentral1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "il-central-1"
VPCRegionCaWest1 [VPCRegion](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/route53/types#VPCRegion) = "ca-west-1"
)
Hope that helps a bit to understand the issue.
Terraform Core Version
1.5.7
AWS Provider Version
5.51.0,5.52.0,5.53.0,5.54.0,5.55.0,5.56.0,5.57.0,5.58.0
Affected Resource(s)
Expected Behavior
terraform validate successfully.
Actual Behavior
terraform validate failed with error.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None