Skip to content

Commit 1c50d66

Browse files
chenwanyenrico-usai
authored andcommitted
Use source_ami in place of source_ami_filter for CentOS7
This is required because CentOS 7 AMI for x86_64 arch has been deprecated and packer does not permit to retrieve it. In this way the custom_ami_id is retrieved upstream (by using --include-deprecated flag) and passed as input as CUSTOM_AMI_ID environment variable. This change doesn't impact CentOS 7 arm because in that case we're using the custom-centos7 builder. Signed-off-by: Enrico Usai <usai@amazon.com>
1 parent 21b0ba9 commit 1c50d66

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

amis/packer_centos7.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,7 @@
3333
"name" : "centos7",
3434
"type" : "amazon-ebs",
3535
"region" : "{{user `region`}}",
36-
"source_ami_filter": {
37-
"filters": {
38-
"virtualization-type": "hvm",
39-
"name": "CentOS 7.* *",
40-
"root-device-type": "ebs",
41-
"architecture": "{{user `ami_arch`}}"
42-
},
43-
"owners": ["125523088429"],
44-
"most_recent": true
45-
},
36+
"source_ami": "{{user `custom_ami_id`}}",
4637
"ami_regions" : "{{user `build_for`}}",
4738
"ami_groups" : "{{user `ami_perms`}}",
4839
"instance_type" : "{{user `instance_type`}}",

0 commit comments

Comments
 (0)