hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.71k stars 9.07k forks source link

aws_ami_from_instance doesn't stop EC2 instance while creating an AMI #13295

Closed ghost closed 3 weeks ago

ghost commented 4 years ago

This issue was originally opened by @ltartarini as hashicorp/terraform#24934. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

0.12.20

Terraform Configuration Files

resource "aws_ami_from_instance" "this" {
  name               = "my_ami"
  source_instance_id = data.aws_instance.this.id
}

Expected Behavior

According to the docs at https://www.terraform.io/docs/providers/aws/r/ami_from_instance.html: "This resource is best applied to an instance that is stopped when this instance is created, so that the contents of the created image are predictable. When applied to an instance that is running, the instance will be stopped before taking the snapshots and then started back up again, resulting in a period of downtime."

Actual Behavior

EC2 instance is not stopped at all while the AMI is created.

References

github-actions[bot] commented 1 month ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!