-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
data source aws_vpc_endpoint_service not working as expect in AWS China partition (cn-north-1) #17640
Comments
I have managed to solve the problem by using filters: data "aws_vpc_endpoint_service" "s3" {
service_type = "Interface"
filter {
name = "service-name"
values = ["*s3*"]
}
}
output "aws_vpc_endpoint_service_s3" {
value = data.aws_vpc_endpoint_service.s3.service_name
}
data "aws_vpc_endpoint_service" "ecr_dkr" {
service_type = "Interface"
filter {
name = "service-name"
values = ["*ecr.dkr*"]
}
}
output "aws_vpc_endpoint_service_ecr_dkr" {
value = data.aws_vpc_endpoint_service.ecr_dkr.service_name
} Results:
|
@marcincuber Thanks for raising this issue. Instead of the data "aws_partition" "current" {}
data "aws_region" "current" {}
data "aws_vpc_endpoint_service" "ecr_dkr" {
service_type = "Interface"
service = "${data.aws_partition.current.reverse_dns_prefix}.${data.aws_region.current.name}.ecr.dkr"
} although this will only succeed in the This is the code at fault: terraform-provider-aws/aws/data_source_aws_vpc_endpoint_service.go Lines 92 to 98 in c63960b
It should use the terraform-provider-aws/aws/provider.go Lines 1528 to 1537 in c63960b
|
@ewbankkit thanks for your response. I think that using |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s) + Terraform Configuration Files
Panic Output
Expected Behavior
Expected behaviour would be to correctly find service name which in "AWS China partition (cn-north-1)" should be
cn.com.amazonaws.cn-north-1.ecr.dkr
. Currently, this is not happening and in fact terraform fails atplan
stage.Steps to Reproduce
terraform plan
The text was updated successfully, but these errors were encountered: