Skip to content

Issue when adding a new network in the snat-sunets list #2

@sbernier-corp

Description

@sbernier-corp

Hi,

After a first deployment,
when you want to add a new network and add it to the snat-subnets you get the following issue ...

Error: Invalid index

on .terraform/modules/vpc/terraform-flexibleengine-vpc-2.0.0/main.tf line 70, in resource "flexibleengine_nat_snat_rule_v2" "snat":
70: network_id = data.flexibleengine_vpc_subnet_v1.snat_subnets[count.index].id
|----------------
| count.index is 2
| data.flexibleengine_vpc_subnet_v1.snat_subnets is tuple with 2 elements

How to reproduce >

  1. Create a VPC with Nat gateaway and 1 network defined in the snat-subnets
  2. Add a new network and add it to the snat-subnets
  3. Try to create the infrastructure
    You should face the upper issue.

Expected behaviour:
Network is added and network is defined as a Nat network.

Thanks,

Stéphane

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions