Comments (3)
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.
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.
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)
- [Bug]: "kms_master_key_id" is not validated on a "apply_server_side_encryption_by_default" block on "aws_s3_bucket_server_side_encryption_configuration" resource HOT 3
- [Bug]: dyanmodb point_in_time_recovery change not detected if it was changed outside terraform HOT 1
- [Bug]: Error in deprecated attribute (overwrite) in aws_ssm_parameter resource. HOT 2
- [Bug]: aws_backup_selection with two condition blocks override each other HOT 1
- [Bug]: Terraform unable to Update Amazon Connect Instance HOT 2
- [Enhancement]: In names_data.hcl reverse skip_client_generate to skip_generate_client HOT 1
- add CIDR as resource option for aws_globalaccelerator_cross_account_attachment HOT 3
- [Enhancement]: AWS RDS Aurora Serverless V1 'Autoscaling timeout' attribute inclusion HOT 1
- [Bug]: MSK Replicator consumer_groups_to_replicate is not tracked correctly HOT 4
- aws_sagemaker_workteam HOT 1
- Replication is not creating for the aws secrets in west HOT 3
- [Bug]: AWS aws_wafv2_web_acl rule and_statement syntax in terraform HOT 3
- [Bug]: Unable to create EC2 Network Insights Path without optional parameter HOT 1
- [Bug]: Spot resources creation hang instead of failing with 'InsufficientInstanceCapacity' when none is available HOT 1
- [Bug]: data.aws_networkmanager_core_network_policy_document attribute with_edge_override.use_edge instead of with_edge_override.use_edge_location HOT 2
- [Bug]: Error: updating OpenSearch Domain (): ValidationException: A change/update is in progress. Please wait for it to complete before requesting another change. HOT 1
- [Bug]: aws_opensearchserverless_collection got AutoFlEx error HOT 7
- resource/aws_m2_environment: Should support setting both `efs` and `fsx` storage HOT 1
- [Bug]: aws_instance instance_market_options: Revert from spot doesn't work HOT 1
- [Bug]: aws_instance instance_market_options: Persistent type creates untracked resource HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-aws.