Skip to content

Commit

Permalink
Update README for looking up AMIs
Browse files Browse the repository at this point in the history
Signed-off-by: peterdeme <[email protected]>
  • Loading branch information
peterdeme committed Dec 7, 2023
1 parent f277e1e commit 8ca174e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions aws.pkr.hcl
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 3 additions & 1 deletion aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions azure.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
packer {
required_plugins {
azure = {
source = "github.com/hashicorp/azure"
version = "~> 2"
}
}
}

variable "client_id" {
type = string
default = ""
Expand Down
9 changes: 9 additions & 0 deletions gcp.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
packer {
required_plugins {
googlecompute = {
source = "github.com/hashicorp/googlecompute"
version = "~> 1"
}
}
}

variable "account_file" {
type = string
default = null
Expand Down

0 comments on commit 8ca174e

Please sign in to comment.