diff --git a/aws.pkr.hcl b/aws.pkr.hcl index eca1919..58722b6 100644 --- a/aws.pkr.hcl +++ b/aws.pkr.hcl @@ -1,5 +1,10 @@ packer { required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + amazon-ami-management = { version = "2.0.0" source = "github.com/spacelift-io/amazon-ami-management" diff --git a/aws/README.md b/aws/README.md index fe145ff..3fcc390 100644 --- a/aws/README.md +++ b/aws/README.md @@ -13,10 +13,12 @@ Use the `awscli` to get the latest AMI ```shell aws ec2 describe-images \ --owners 643313122712 \ - --filters "Name=name,Values=spacelift-*" \ + --filters "Name=name,Values=spacelift-*" "Name=architecture,Values=x86_64" \ --query 'sort_by(Images, &CreationDate)[-1]' ``` +Architecture could be either `x86_64` or `arm64`. + #### Terraform Use a terraform data source to retrieve the latest AMI diff --git a/azure.pkr.hcl b/azure.pkr.hcl index 34f6b89..eaf20d2 100644 --- a/azure.pkr.hcl +++ b/azure.pkr.hcl @@ -1,3 +1,12 @@ +packer { + required_plugins { + azure = { + source = "github.com/hashicorp/azure" + version = "~> 2" + } + } +} + variable "client_id" { type = string default = "" diff --git a/gcp.pkr.hcl b/gcp.pkr.hcl index 422cb6d..8d781cb 100644 --- a/gcp.pkr.hcl +++ b/gcp.pkr.hcl @@ -1,3 +1,12 @@ +packer { + required_plugins { + googlecompute = { + source = "github.com/hashicorp/googlecompute" + version = "~> 1" + } + } +} + variable "account_file" { type = string default = null