Giter VIP home page Giter VIP logo

Comments (3)

Nachiket-K avatar Nachiket-K commented on August 16, 2024 1

Configuration

resource "aws_instance" "instance-01" {
  ami = "ami-xxxxxxxxxxxxxxxxx"
  instance_type = "t2.micro"
}

resource "aws_instance" "instance-02" {
  ami = "ami-xxxxxxxxxxxxxxxxx"
  instance_type = "t2.micro"
}

resource "aws_eip" "eip-01" {
  tags = {
    Name = "test-eip01"
  }
}

resource "aws_eip_association" "eip_assoc-01" {
  allocation_id = aws_eip.eip-01.allocation_id
  instance_id = aws_instance.instance-01.id
  allow_reassociation = false
}

resource "aws_eip_association" "eip_assoc-02" {
  allocation_id = aws_eip.eip-01.allocation_id
  instance_id = aws_instance.instance-02.id
  allow_reassociation = false
}

Output

> terraform apply
aws_eip.eip-01: Creating...
aws_instance.instance-02: Creating...
aws_instance.instance-01: Creating...
aws_eip.eip-01: Creation complete after 4s [id=eipalloc-xxxxxxxxxxxxxxxxx]
aws_instance.instance-02: Still creating... [10s elapsed]
aws_instance.instance-01: Still creating... [10s elapsed]
aws_instance.instance-01: Still creating... [20s elapsed]
aws_instance.instance-02: Still creating... [20s elapsed]
aws_instance.instance-01: Still creating... [30s elapsed]
aws_instance.instance-02: Still creating... [30s elapsed]
aws_instance.instance-01: Still creating... [40s elapsed]
aws_instance.instance-02: Still creating... [40s elapsed]
aws_instance.instance-01: Creation complete after 41s [id=i-xxxxxxxxxxxxxxxxx]
aws_eip_association.eip_assoc-01: Creating...
aws_eip_association.eip_assoc-01: Creation complete after 5s [id=eipassoc-xxxxxxxxxxxxxxxxx]
aws_instance.instance-02: Still creating... [50s elapsed]
aws_instance.instance-02: Creation complete after 53s [id=i-xxxxxxxxxxxxxxxxx]
aws_eip_association.eip_assoc-02: Creating...
aws_eip_association.eip_assoc-02: Creation complete after 4s [id=eipassoc-xxxxxxxxxxxxxxxxx]

Apply complete! Resources: 5 added, 0 changed, 0 destroyed.

Expected behavior:

The 2nd EIP association i.e."aws_eip_association.eip_assoc-02" (that associates eip-01 to instance-02) should fail since

  • It has 'allow_reassociation' set to false & the EIP specified in its 'allocation_id' parameter is already associated to instance-01 (through "aws_eip_association.eip_assoc-01")

from terraform-provider-aws.

github-actions avatar github-actions commented on August 16, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

from terraform-provider-aws.

justinretzolk avatar justinretzolk commented on August 16, 2024

Hey @Nachiket-K 👋 Thank you for taking the time to raise this! So that we have the necessary information to look into this, can you supply a sample configuration that can be used to reproduce the issue, as well as debug logs (redacted as needed)?

from terraform-provider-aws.

Related Issues (20)

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.