Closed dhrkumar closed 3 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Hey @dhrkumar 👋 Thank you for taking the time to raise this! Terraform Core builds the resource graph and determines the order of operations. With that in mind, you'll want to open an issue in the Terraform Core repository in order to have this properly addressed.
Since there's no action for the AWS Provider team to take on this particular issue, I'm going to close it, but if you do experience unexpected behavior with the provider in the future, please do let us know!
[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.
Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Core Version
1.9.2
AWS Provider Version
5.59.0
Affected Resource(s)
Expected Behavior
Apply command should have update route to remove virtual node reference followed by destroying virtual node.
Actual Behavior
Terraform attempted to destroy virtual node while route was still having referencing the virtual node as one of the targets.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform apply
aws_appmesh_virtual_node.node
and blockaws_appmesh_route.route.spec.http_route
resource "aws_vpc" "vpc" { cidr_block = "10.0.0.0/16" enable_dns_support = true enable_dns_hostnames = true }
resource "aws_service_discovery_private_dns_namespace" "namespace" { name = "example.terraform.local" description = "example" vpc = aws_vpc.vpc.id }
resource "aws_service_discovery_service" "service" { name = "service" dns_config { namespace_id = aws_service_discovery_private_dns_namespace.namespace.id dns_records { ttl = 10 type = "A" } routing_policy = "MULTIVALUE" } }
resource "aws_appmesh_virtual_node" "node" {
mesh_name = aws_appmesh_mesh.mesh.name
name = "node"
spec {
service_discovery {
aws_cloud_map {
namespace_name = aws_service_discovery_private_dns_namespace.namespace.name
service_name = "service"
}
}
listener {
port_mapping {
port = 80
protocol = "http"
}
}
}
}
resource "aws_appmesh_virtual_router" "router" { mesh_name = aws_appmesh_mesh.mesh.name name = "router" spec { listener { port_mapping { port = 80 protocol = "http" } } } }
resource "aws_appmesh_route" "route" { mesh_name = aws_appmesh_mesh.mesh.name name = "route" virtual_router_name = aws_appmesh_virtual_router.router.name spec { priority = 1000
http_route {
match {
prefix = "/"
port = 80
}
action {
weighted_target {
virtual_node = aws_appmesh_virtual_node.node.name
weight = 100
port = 80
}
}
}
} }