A Concourse CI resource to check for new Amazon Machine Images (AMI).
-
aws_access_key_id
: Your AWS access key ID. -
aws_secret_access_key
: Your AWS secret access key. -
region
: Required. The AWS region to search for AMIs. -
owners
: A list of owners to filter for. See the--owners
flag in the AWS CLI describe-images documentation. -
filters
: Required. A map of named filters to their values. Check the AWS CLI describe-images documentation for a complete list of acceptable filters and values.
If aws_access_key_id
and aws_secret_access_key
are both absent, AWS CLI will fall back to other authentication mechanisms. See Configuration setting and precedence
Searches for AMIs that match the provided source filters, ordered by their creation date. The AMI ID serves as the resulting version.
None.
Places the following files in the destination:
-
output.json
: The complete AMI description object in JSON format. Check the AWS CLI describe-images documentation for examples. -
id
: A plain text file containing the AMI ID, e.g.ami-5731123e
-
packer.json
: The AMI ID in Packervar-file
input format, typically for use with packer-resource, e.g.{"source_ami": "ami-5731123e"}
For bookkeeping in Concourse—generates a new version immediately so it can be passed to the next job in a pipeline without needing a check
to run. Expects a JSON file at input/json
with an object containing an ImageId
property e.g.
{
"ImageId": "ami-...",
...
}
input
can be overridden with the put params input
e.g.
put: my-image
params:
input: other-input
in which case the JSON file is expected at other-input/json
.
None.
This pipeline will check for a new Ubuntu 14.04 LTS AMI in the Sydney region every hour, triggering the next step of the build plan if it finds one.
resource_types:
- name: ami
type: docker-image
source:
repository: jdub/ami-resource
resources:
- name: ubuntu-ami
type: ami
check_every: 1h
source:
aws_access_key_id: "..."
aws_secret_access_key: "..."
region: ap-southeast-2
filters:
owner-id: "099720109477"
is-public: true
state: available
name: ubuntu/images/hvm-ssd/ubuntu-trusty-*server*
jobs:
- name: my-ami
plan:
- get: ubuntu-ami
trigger: true
- task: build-fresh-image
...