Hmm, that seems broken. Packer should create encrypted snapshots copies
from the main encrypted snapshot. What version of Packer do you use?

On Tue, Feb 5, 2019 at 1:15 AM Frank Dias <[email protected]> wrote:

> ==> amazon-ebs: Stopping the source instance...
>     amazon-ebs: Stopping instance, attempt 1
> ==> amazon-ebs: Waiting for the instance to stop...
> ==> amazon-ebs: Enabling Enhanced Networking (ENA)...
> ==> amazon-ebs: Creating unencrypted AMI FwOBiwF from instance
> i-0f3f4ac15c6b6cbc5
>     amazon-ebs: AMI: ami-0f75316b152634e4f
> ==> amazon-ebs: Waiting for AMI to become ready...
> ==> amazon-ebs: Creating Encrypted AMI Copy
> ==> amazon-ebs: Copying AMI: us-east-2(ami-0f75316b152634e4f)
> ==> amazon-ebs: Waiting for AMI copy to become ready...
> ==> amazon-ebs: Deregistering unencrypted AMI
> ==> amazon-ebs: Deleting unencrypted snapshots
>     amazon-ebs: Deleting Snapshot ID: snap-00cfa506fcaa0d4ee
> ==> amazon-ebs: Copying AMI (ami-0419bfd39943f48db) to other regions...
>     amazon-ebs: Copying to: us-west-1
>     amazon-ebs: Copying to: us-west-2
>     amazon-ebs: Copying to: us-east-1
>     amazon-ebs: Waiting for all copies to complete...
> ==> amazon-ebs: 3 error(s) occurred:
> ==> amazon-ebs:
> ==> amazon-ebs: * Error Copying AMI (ami-0419bfd39943f48db) to region
> (us-east-1): InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted.
> Creating unencrypted copy from an encrypted snapshot is not supported.
> ==> amazon-ebs: status code: 400, request id:
> 150f7ab3-6001-48cd-a768-f604952bf43b
> ==> amazon-ebs: * Error Copying AMI (ami-0419bfd39943f48db) to region
> (us-west-1): InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted.
> Creating unencrypted copy from an encrypted snapshot is not supported.
> ==> amazon-ebs: status code: 400, request id:
> bffa5254-8dd2-4b7d-b826-09ac26eb787d
> ==> amazon-ebs: * Error Copying AMI (ami-0419bfd39943f48db) to region
> (us-west-2): InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted.
> Creating unencrypted copy from an encrypted snapshot is not supported.
> ==> amazon-ebs: status code: 400, request id:
> 4b8a7831-4909-4707-84c4-1535b0a8f17d
> ==> amazon-ebs: Deregistering the AMI because cancellation or error...
> ==> amazon-ebs: Deregistering the AMI because cancellation or error...
> ==> amazon-ebs: Error deregistering AMI, may still be around:
> InvalidAMIID.Unavailable: The image ID 'ami-0f75316b152634e4f' is no longer
> available
> ==> amazon-ebs: status code: 400, request id:
> b83c1a0b-c407-492d-8793-8342220f1735
> ==> amazon-ebs: Terminating the source AWS instance...
> ==> amazon-ebs: Cleaning up any extra volumes...
> ==> amazon-ebs: Destroying volume (vol-0df7658d7627c001f)...
> ==> amazon-ebs: Deleting temporary security group...
> ==> amazon-ebs: Deleting temporary keypair...
> Build 'amazon-ebs' errored: 3 error(s) occurred:
>
> * Error Copying AMI (ami-0419bfd39943f48db) to region (us-east-1):
> InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted. Creating
> unencrypted copy from an encrypted snapshot is not supported.
> status code: 400, request id: 150f7ab3-6001-48cd-a768-f604952bf43b
> * Error Copying AMI (ami-0419bfd39943f48db) to region (us-west-1):
> InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted. Creating
> unencrypted copy from an encrypted snapshot is not supported.
> status code: 400, request id: bffa5254-8dd2-4b7d-b826-09ac26eb787d
> * Error Copying AMI (ami-0419bfd39943f48db) to region (us-west-2):
> InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted. Creating
> unencrypted copy from an encrypted snapshot is not supported.
> status code: 400, request id: 4b8a7831-4909-4707-84c4-1535b0a8f17d
>
> ==> Some builds didn't complete successfully and had errors:
> --> amazon-ebs: 3 error(s) occurred:
>
> * Error Copying AMI (ami-0419bfd39943f48db) to region (us-east-1):
> InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted. Creating
> unencrypted copy from an encrypted snapshot is not supported.
> status code: 400, request id: 150f7ab3-6001-48cd-a768-f604952bf43b
> * Error Copying AMI (ami-0419bfd39943f48db) to region (us-west-1):
> InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted. Creating
> unencrypted copy from an encrypted snapshot is not supported.
> status code: 400, request id: bffa5254-8dd2-4b7d-b826-09ac26eb787d
> * Error Copying AMI (ami-0419bfd39943f48db) to region (us-west-2):
> InvalidRequest: Snapshot snap-05657965eb9352840 is encrypted. Creating
> unencrypted copy from an encrypted snapshot is not supported.
> status code: 400, request id: 4b8a7831-4909-4707-84c4-1535b0a8f17d
>
> ==> Builds finished but no artifacts were created.
>
>
> On Monday, February 4, 2019 at 1:19:21 PM UTC-6, Rickard von Essen wrote:
>>
>> What's the error message you are getting?
>>
>> On Mon, Feb 4, 2019 at 7:33 PM Frank Dias <[email protected]> wrote:
>>
>>> I am using the following packer file; it is failing on the last function
>>> of copying to other regions.
>>> copying encrypted AIM not supported. I would think that it would copy
>>> first then encrypt.
>>> any help would be greatly appreciated.
>>>
>>> Frank
>>>
>>> {
>>>   "_comment": "To create a new AMI in us-west-2 run:",
>>>   "_comment": "  packer build -var aws_region='us-west-2'
>>> dockerhost.json",
>>>   "_comment": "To create an AMI and copy to one or more regions, run:",
>>>   "_comment": "  packer build -var aws_region='us-west-2' -var
>>> copy_to='us-west-1,eu-central-1' dockerhost.json",
>>>   "variables": {
>>>     "aws_region": "",
>>>     "copy_to": "",
>>>     "aws_vpc_id": "",
>>>     "aws_subnet_id": "",
>>>     "instance_type": "m3.medium",
>>>     "version": "0.0.3"
>>>   },
>>>   "builders": [{
>>>     "type": "amazon-ebs",
>>>     "vpc_id": "{{user `aws_vpc_id`}}",
>>>     "subnet_id": "{{user `aws_subnet_id`}}",
>>>     "region": "{{user `aws_region`}}",
>>>     "ami_regions": "{{user `copy_to`}}",
>>>     "source_ami_filter": {
>>>       "filters": {
>>>         "virtualization-type": "hvm",
>>>         "name": "CentOS Linux 7*",
>>>         "state": "available",
>>>         "root-device-type": "ebs"
>>>       },
>>>       "owners": [ "679593333241" ],
>>>       "most_recent": true
>>>     },
>>>     "user_data_file": "./scripts/disable_requiretty.sh",
>>>     "instance_type": "{{user `instance_type`}}",
>>>     "ssh_username": "centos",
>>>     "ami_name": "dockerhost {{timestamp}}",
>>>     "encrypt_boot": true,
>>>     "ena_support": true,
>>>     "tags": {
>>>       "Owner": "arrayent",
>>>       "Version": "{{user `version`}}",
>>>       "Environment": "packer build"
>>>     }
>>>   }],
>>>   "provisioners": [{
>>>     "type": "ansible",
>>>     "user": "centos",
>>>     "extra_arguments": "-vvv",
>>>     "pause_before": "10s",
>>>     "sftp_command": "/usr/libexec/openssh/sftp-server",
>>>     "playbook_file": "../playbooks/packer/play.yml"
>>>   }]
>>> }
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/ee19e981-65b7-4df8-9c99-8be1012d53ee%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/ee19e981-65b7-4df8-9c99-8be1012d53ee%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/7b0c364a-ac83-44c1-84a9-037375d058bc%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/7b0c364a-ac83-44c1-84a9-037375d058bc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt-s9smcsce8SF1%3DfOkU-3tonX5hvSQpOwwupBMZ43dHJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to