volterraedge / terraform-provider-volterra

Volterra's Public Terraform Provider
https://volterra.io
Apache License 2.0
14 stars 11 forks source link

AWS VPC Site Ingress/Egress Workload Subnet #208

Open bradotlin opened 1 year ago

bradotlin commented 1 year ago

When creating an AWS VPC site with 2 interfaces (ingress and egress), if you choose an existing subnet as the workload subnet the Apply will finish with errors if that subnet is already explicitly associated to a route table. The happens because the terraform attempts to explicitly associate this subnet to a new route table. But since it is already associated, there is an error. The console should make this warning and state that a route should not be associated to the selected subnet.


Here is the Terraform Apply status output:

apply_state: APPLY_ERRORED tf_output: > subnet_info = [{"az":"us-east-1a","inside_subnet":{"cidr_block":"10.0.30.0/24","id":"subnet-xxxx"},"outside_subnet":{"cidr_block":"10.0.10.0/24","id":"subnet-xxxx"},"workload_subnet":{"cidr_block":"10.0.20.0/24","id":"subnet-xxxx"}}]

aws_dx_gw_id = ""

controller_dp_private_sli_ips = ["10.0.30.162"]

volt_vpc_id = "vpc-xxxx"

aws_object_name = "nbY3Hf7AG"

worker_private_ip_address = ""

worker_public_ip_address = ""

route_table_workload_ids = ["rtb-xxxx"]

master_public_ip_address = "18.210.141.214"

volt_node_hostname_mapppings = {"ves-node-id-6fb59957f7":"ip-10-0-10-96"}

volt_node_eip_mappings = {"ves-node-id-6fb59957f7":"18.210.141.214"}

volt_vpc_id_mappings = {"ves-vpc-id-vpc-0ac9417caf4faa975":"vpc-0ac9417caf4faa975"}

aws_vgw_id = ""

master_private_ip_address = "10.0.10.96" error_output: >+ exit status 1

2023/05/08 20:41:15 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.15.0

Error: error creating Route Table (rtb-xxxx) Association: Resource.AlreadyAssociated: the specified association for route table rtb-xxxx conflicts with an existing association status code: 400, request id: 9180450f-2058-4ffd-9ed2-429447e752f2

on ../../../modules/views/ce-aws-network-existing-vpc/main.tf line 366, in resource "aws_route_table_association" "volt_workload": 366: resource "aws_route_table_association" "volt_workload" {

modification_timestamp: 2023-05-08T20:41:24.285533270Z tf_stdout: "" container_version: volterra.azurecr.io/ves.io/terraform-public@sha256:xxxx