Skip to content
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

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

Open
sbernier-corp opened this issue Aug 31, 2020 · 1 comment
Open

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

sbernier-corp opened this issue Aug 31, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@sbernier-corp
Copy link
Contributor

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

@vlandemaine-orange
Copy link
Contributor

The issue coming from the data part to retrieve the subnet name.
We need to add a new boolean parameter inside the subnet object, in order to delete the data part.
The SNAT rule resource will be created with a for each with a conditional testing.

@vlandemaine-orange vlandemaine-orange added the bug Something isn't working label Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants