Hi, Frank,

we have used as below, and are on packer v1.2.3

"variables":
{
"kms_key_id_eu-central-1" : "arn:aws:kms:eu-central-1:[[aws account
id]]:key/xxxx-xxx-xxx-xxx-xxxxx",
"kms_key_id_us-west-2" : "arn:aws:kms:us-west-2:[[aws account id]]:key/
xxxx-xxx-xxx-xxx-xxxxx",
"kms_key_id_us-east-1" : "arn:aws:kms:us-east-1:[[aws account id]]:key/
xxxx-xxx-xxx-xxx-xxxxx",
"kms_key_id_eu-west-3" : "arn:aws:kms:eu-west-3:[[aws account id]]:key/
xxxx-xxx-xxx-xxx-xxxxx",
"kms_key_id_eu-central-1" : "arn:aws:kms:eu-central-1:[[aws account id]]
:key/xxxx-xxx-xxx-xxx-xxxxx"
}

In the build section, you can pass as below.
"region_kms_key_ids" : {
"us-west-1": "{{user `kms_key_id_us-west-1`}}",
"us-east-1": "{{user `kms_key_id_us-east-1`}}",
"eu-west-2": "{{user `kms_key_id_eu-west-2`}}",
"eu-central-1": "{{user `kms_key_id_eu-central-1`}}"
},

On Tue, Feb 5, 2019 at 2:30 PM Frank Dias <[email protected]> wrote:

> Rickard,
>
> what is the best way to generate a map from the copy_to string. this was
> as the user sets the copy_to ?  not have to hardcode the regions, take them
> as input
>
> frank
>
> On Tuesday, February 5, 2019 at 8:13:04 AM UTC-6, Rickard von Essen wrote:
>>
>>
>> I thought that is would copy the unencrypted copy to the new region and
>>> then encrypt. encryption is region specific
>>
>> No, CopyImage can copy a encrypted AMI, but it will be reencrypted with a
>> KMS key that belongs to new region.
>>
>> As a workaround try add this to your template:
>>
>> "region_kms_key_ids": {
>>   "us-west-1": "aws/ebs",
>>   "eu-central-1": "aws/ebs"
>> }
>>
>> And add the regions that you might use in copy_to...
>>
>> Reading the docs again sugests that:
>> "region_kms_key_ids": {
>>   "us-west-1": "",
>>   "eu-central-1": ""
>> }
>>
>> Should work to?
>>
>> On Tue, Feb 5, 2019 at 2:30 PM Frank Dias <[email protected]> wrote:
>>
>>> 1.3.3 and tried 1.3.4
>>> I thought that is would copy the unencrypted copy to the new region and
>>> then encrypt. encryption is region specific
>>>
>>> --
>>> 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/5f765ebd-6044-42b9-b763-f47d190bdf62%40googlegroups.com
>>> .
>>> 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/eb3f7f25-1bc7-4d5c-93b1-e0f369fa9490%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/eb3f7f25-1bc7-4d5c-93b1-e0f369fa9490%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/CAPxBRp6oFi_H9v4MphHZgyy8SgLwVmoe_y8U0Uu77DvwjxjHtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to