-
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
Changing VPC peering parameters using aws_vpc_peering_connection_options resource fails #12113
Comments
@roman8422 For 1 - Peering options can be added only to active peerings - you can set the // Requester's side of the connection.
resource "aws_vpc_peering_connection_options" "requester_peering_options" {
provider = "aws.foo"
# As options can't be set until the connection has been accepted
# create an explicit dependency on the accepter.
vpc_peering_connection_id = aws_vpc_peering_connection_accepter.bar.id
requester {
allow_remote_vpc_dns_resolution = true
}
}
// Accepter's side of the connection.
resource "aws_vpc_peering_connection_options" "accepter_peering_options" {
provider = "aws.bar"
vpc_peering_connection_id = aws_vpc_peering_connection_accepter.bar.id
accepter {
allow_remote_vpc_dns_resolution = true
}
} For 2 - Requester’s VPC Peering connection options cannot be modified for a different region - I get the same error with a modified acceptance test: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSVpcPeeringConnectionOptions_differentRegionSameAccount'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSVpcPeeringConnectionOptions_differentRegionSameAccount -timeout 120m
=== RUN TestAccAWSVpcPeeringConnectionOptions_differentRegionSameAccount
=== PAUSE TestAccAWSVpcPeeringConnectionOptions_differentRegionSameAccount
=== CONT TestAccAWSVpcPeeringConnectionOptions_differentRegionSameAccount
--- FAIL: TestAccAWSVpcPeeringConnectionOptions_differentRegionSameAccount (61.60s)
testing.go:654: Step 2 error: errors during apply:
Error: error modifying VPC Peering Connection (pcx-0383b7f8bd47fb8c1) Options: InvalidParameterValue: Accepter’s VPC Peering connection options cannot be modified for a different region
status code: 400, request id: 112635d8-bb0a-4f56-92e8-04fb4b9a25d5
on /tmp/tf-test594142281/main.tf line 48:
(source code not available)
Error: error modifying VPC Peering Connection (pcx-0383b7f8bd47fb8c1) Options: InvalidParameterValue: Requester’s VPC Peering connection options cannot be modified for a different region
status code: 400, request id: d26074cb-6910-4d10-bee9-7728aa539366
on /tmp/tf-test594142281/main.tf line 59:
(source code not available)
FAIL
FAIL github.com/terraform-providers/terraform-provider-aws/aws 61.700s
FAIL
GNUmakefile:25: recipe for target 'testacc' failed
make: *** [testacc] Error 1 According to the documentation this should be possible. |
I see the problem - VPC peering connection option updates are being submitted for both |
The above fix has been merged and will release with version 3.13.0 of the Terraform AWS Provider, likely tomorrow. Thanks to @ewbankkit for the implementation. 👍 |
This has been released in version 3.13.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
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
terraform apply
terraform apply
allow_remote_vpc_dns_resolution = false
for either requester or accepter and get the following error:Expected Behavior
allow_remote_vpc_dns_resolution
should be set tofalse
Actual Behavior
Apply fails with the error:
The text was updated successfully, but these errors were encountered: