aiven / terraform-provider-aiven

Aiven Terraform Provider
https://registry.terraform.io/providers/aiven/aiven/latest/docs
MIT License
128 stars 69 forks source link

Cannot add CIDR range to `aiven_transit_gateway_vpc_attachment` #1310

Closed supergillis closed 1 year ago

supergillis commented 1 year ago

What happened?

Adding a CIDR block to an aiven_transit_gateway_vpc_attachment results in an error.

Terraform used the selected providers to generate the following execution plan.
Resource actions are indicated with the following symbols:
  ~ update in-place
Terraform will perform the following actions:
  # aiven_transit_gateway_vpc_attachment.network_iot-devops-aiven-iot-dev_aiven_320782F5 (network/iot-devops-aiven-iot-dev/aiven) will be updated in-place
  ~ resource "aiven_transit_gateway_vpc_attachment" "network_iot-devops-aiven-iot-dev_aiven_320782F5" {
        id                      = "iot-dev/b4e9c743-6a95-4868-b856-cf457a6d434a/153809372410/tgw-073486e67566842f7/eu-west-1"
      ~ user_peer_network_cidrs = [
          + "10.9.32.0/19",
            # (4 unchanged elements hidden)
        ]
        # (6 unchanged attributes hidden)
        # (1 unchanged block hidden)
    }
Plan: 0 to add, 1 to change, 0 to destroy.
╷
│ Warning: Argument is deprecated
│ 
│   with aiven_transit_gateway_vpc_attachment.network_iot-dev-timescale-iot-dev_aiven_311BD928 (network/iot-dev-timescale-iot-dev/aiven),
│   on cdk.tf.json line 1212, in resource.aiven_transit_gateway_vpc_attachment.network_iot-dev-timescale-iot-dev_aiven_311BD928 (network/iot-dev-timescale-iot-dev/aiven):
│ 1212:         "peer_region": "${element(split(\":\", aws_ec2_transit_gateway.gateway-iot-dev (gateway-iot-dev).arn), 3)}",
│ 
│ This field is deprecated and will be removed in the next major release.
│ 
│ (and 16 more similar warnings elsewhere)
╵

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.
Enter a value: yes
aiven_transit_gateway_vpc_attachment.network_iot-devops-aiven-iot-dev_aiven_320782F5 (network/iot-devops-aiven-iot-dev/aiven): Modifying... [id=iot-dev/b4e9c743-6a95-4868-b856-cf457a6d434a/153809372410/tgw-073486e67566842f7/eu-west-1]
╷
│ Warning: Argument is deprecated
│ 
│   with aiven_transit_gateway_vpc_attachment.network_iot-devops-aiven-iot-dev_aiven_320782F5 (network/iot-devops-aiven-iot-dev/aiven),
│   on cdk.tf.json line 1254, in resource.aiven_transit_gateway_vpc_attachment.network_iot-devops-aiven-iot-dev_aiven_320782F5 (network/iot-devops-aiven-iot-dev/aiven):
│ 1254:         "peer_region": "${element(split(\":\", aws_ec2_transit_gateway.main (iot-devops).arn), 3)}",
│ 
│ This field is deprecated and will be removed in the next major release.
╵
╷
│ Error: cannot update transit gateway vpc attachment 400: {"errors":[{"message":"Invalid input for delete: None is not of type 'array'","status":400}],"message":"Invalid input for delete: None is not of type 'array'"} - 
│ 
│   with aiven_transit_gateway_vpc_attachment.network_iot-devops-aiven-iot-dev_aiven_320782F5 (network/iot-devops-aiven-iot-dev/aiven),
│   on cdk.tf.json line 1262, in resource.aiven_transit_gateway_vpc_attachment.network_iot-devops-aiven-iot-dev_aiven_320782F5 (network/iot-devops-aiven-iot-dev/aiven):
│ 1262:       },
│ 
╵
Releasing state lock. This may take a few moments...

What did you expect to happen?

I expected the CIDR range to be added to the VPC attachment.

What else do we need to know?

Aiven provider version: 4.8.0

byashimov commented 1 year ago

Hey. Thanks for the reporting. Regarding to the version: please update to 4.8.2 as 4.8.0 might be unstable or defective.

supergillis commented 1 year ago

Will this fix be included in the next release?

Serpentiel commented 1 year ago

hey 👋

yep!