You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an error when setting create_eip = true in the module. The module fails during apply with the following error:
Error: Value for unconfigurable attribute
with module.ec2_instance.aws_eip.this,
on .terraform/modules/ec2_instance/main.tf line 619, in resource "aws_eip" "this":
619: domain = var.eip_domain
Can't configure a value for "domain": its value will be decided automatically based on the result of applying this configuration.
It appears the module is explicitly setting the domain argument on the aws_eip resource, which is now inferred automatically by the AWS provider and should no longer be set manually.
Terraform should provision the EC2 instance and automatically associate an Elastic IP using the module.
Actual behavior
Terraform errors during plan/apply due to unconfigurable domain argument being set inside the module.
Terminal Output Screenshot(s)
Error: Value for unconfigurable attribute
│
│ with module.ec2_instance.aws_eip.this,
│ on .terraform/modules/ec2_instance/main.tf line 619, in resource "aws_eip" "this":
│ 619: domain = var.eip_domain
│
│ Can't configure a value for "domain": its value will be decided automatically based on the result of applying this configuration.
Additional context
This likely stems from a change in AWS provider behavior where the domain attribute in aws_eip is now inferred automatically. The module should remove or guard against setting domain explicitly.
The text was updated successfully, but these errors were encountered:
Description
I'm encountering an error when setting
create_eip = true
in the module. The module fails during apply with the following error:It appears the module is explicitly setting the
domain
argument on theaws_eip
resource, which is now inferred automatically by the AWS provider and should no longer be set manually.Minimal reproducible configuration:
.terraform
directory has been deletedterraform init
Versions
v5.7.0
Reproduction Code [Required]
Expected behavior
Terraform should provision the EC2 instance and automatically associate an Elastic IP using the module.
Actual behavior
Terraform errors during plan/apply due to unconfigurable
domain
argument being set inside the module.Terminal Output Screenshot(s)
Additional context
This likely stems from a change in AWS provider behavior where the
domain
attribute inaws_eip
is now inferred automatically. The module should remove or guard against settingdomain
explicitly.The text was updated successfully, but these errors were encountered: