packer-plugin-amazon icon indicating copy to clipboard operation
packer-plugin-amazon copied to clipboard

Error waiting for instance to become ready: ResourceNotReady: failed waiting for successful resource state

Open hc-github-team-packer opened this issue 4 years ago • 1 comments

This issue was originally opened by @bala-gif in https://github.com/hashicorp/packer/issues/11143 and has been migrated to this repository. The original issue description is below.


Hi Team,

I am using packer version=1.3.1 and running into following error when try to encrypt the root volume.

Error details: Error waiting for instance(instance_id) to become ready: ResourceNotReady: failed waiting for successful resource state

Any help would be much appreciated.

Attaching the partial template that we are using.

{ "builders" : [ { "type" : "amazon-ebs", "instance_type" : "m5.large", "ssh_username" : "ec2-user", "ssh_pty" : "true", "subnet_id": "subnet-XXXX", "security_group_ids": ["sg-XXXX","sg-XXXXX"], "vpc_id": "vpc-XXXX", "encrypt_boot": true, "associate_public_ip_address": true, "iam_instance_profile": "ec2-dbhost-role", "launch_block_device_mappings": [ { "encrypted": true, "device_name": "/dev/xvdb", "volume_size": 55, "volume_type": "gp3", "delete_on_termination": true }, { "encrypted": true, "device_name": "/dev/xvdc", "volume_size": 20, "volume_type": "gp3", "delete_on_termination": true },

hc-github-team-packer avatar Jul 21 '21 13:07 hc-github-team-packer

This is caused by missing/invalid KMS permissions, make sure the following are included:

"kms:ReEncrypt*", "kms:GenerateDataKey*", "kms:CreateGrant", "kms:DescribeKey"

danwashusen avatar Sep 28 '22 02:09 danwashusen