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
resource "aws_ami_from_instance" "manage-ami" {
# since the name of the AMI includes a timestamp, this lifecycle rule prevents
# the resource from being included for every time execution of apply/plan.
lifecycle {
ignore_changes = true
}
depends_on = ["null_resource.bootstrap_frontend"]
name = "manage-${var.manage_version}-${lower(var.environment)}-${replace(timestamp(), ":", "")}"
source_instance_id = "${aws_instance.frontends.id}"
}
resource "aws_launch_configuration" "manage" {
depends_on = ["aws_ami_from_instance.manage-ami"]
name = "launch configuration"
image_id = "${aws_ami_from_instance.manage-ami.id}"
instance_type = "${var.aws_instance_type["frontend"]}"
iam_instance_profile = "sentinel"
key_name = "${var.ssh_key_name}"
security_groups = ["sg-000000"]
associate_public_ip_address = false
}
Expected Behavior
The resource aws_ami_from_instance.manage-ami created a new AMI, so the AMI ID should be exported and usable by other resources.
Actual Behavior
Error running plan: 1 error(s) occurred:
* aws_launch_configuration.manage: 1 error(s) occurred:
* aws_launch_configuration.manage: Resource 'aws_ami_from_instance.manage-ami' does not have attribute 'id' for variable 'aws_ami_from_instance.manage-ami.id'
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered:
I think this is the same issue being discussed in #5185. In that issue, people reported that the problem went away after re-running terraform apply again. Is that true for you too, or is it persistent no matter how many times you apply?
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 5, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
0.9.5
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
The resource aws_ami_from_instance.manage-ami created a new AMI, so the AMI ID should be exported and usable by other resources.
Actual Behavior
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered: