Git Product home page Git Product logo

learning-terraform-3087701's Issues

Code 04_02 Error creating EC2 Subnet: InvalidSubnet.Conflict

When I try to apply the plan on the 04_02 branch I'm getting an error:

Error: creating EC2 Subnet: InvalidSubnet.Conflict: The CIDR '10.0.102.0/24' conflicts with another subnet status code: 400, request id: d24db4d9-d13d-44e3-b741-b4af409fc7d7
with module.blog_vpc.aws_subnet.public[1]
on .terraform/modules/blog_vpc/main.tf line 97, in resource "aws_subnet" "public":
resource "aws_subnet" "public" {

Screenshot 2024-02-09 at 4 28 18 PM

Code 04_01 error in function call: aws_route_table.private is empty tuple

When running the code solution in branch 04_01, terraform returns errors:

Error: Error in function call
on .terraform/modules/blog_vpc/main.tf line 1087, in resource "aws_route" "private_nat_gateway":
  route_table_id         = element(aws_route_table.private[*].id, count.index)
while calling element(list, index)
aws_route_table.private is empty tuple
count.index is [NB: terraform returns 3 errors, all with the same trace except here, where count.index ranges between 0 and 2.] 
Call to function "element" failed: cannot use element function with an empty list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.