diff --git a/README.md b/README.md index a502e5c..9a7008d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,14 @@ Before you can use this workflow, you need to set up these GitHub Secrets: ▪ AWS_ACCESS_KEY_ID ▪ AWS_SECRET_ACCESS_KEY To use this example: - +Get an instance id: +```aiignore +aws ec2 describe-images \ + --owners amazon \ + --filters "Name=name,Values=al2023-ami-*" "Name=architecture,Values=x86_64" \ + --query "sort_by(Images, &CreationDate)[-1].ImageId" \ + --output text +``` 1. Create a new GitHub repository 1. Add the files as shown above 1. Add this to gha yml files: diff --git a/terraform/main.tf b/terraform/main.tf index 509ff70..7e9896e 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -3,7 +3,7 @@ provider "aws" { } resource "aws_instance" "example" { - ami = "ami-0c55b159cbfafe1f0" # Amazon Linux 2 AMI (change as needed) + ami = "ami-0709112b97e5accb1" # Amazon Linux 2 AMI (change as needed) instance_type = "t2.micro" tags = {