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 229e6af
Show file tree
Hide file tree
Showing 2 changed files with 8 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

0 comments on commit 229e6af

Please sign in to comment.