Resource implementing the awscli to work with AMI images.
10K+
Concourse resource to create AWS AMI's using Hashicorp Packer
https://hub.docker.com/r/aequitas/aws-ami-resource/
Currently there is no source configuration required. AWS credentials can be provider using IAM roles.
out: Build AMI from templatePerforms a packer build using specified template and build variables. Template should specify a amazon-ebs type builder. Exports AMI ID and region as version and files (file names: id and region).
template_path: Required. Path to the packer template file.
build_vars: Optional. Build vars passed to packer build, specified as key/value pairs.
build_vars_from_file: Optional. Build vars passed to packer build. Instead of specifying the value the path to a file is specified from which value should be read. For example, to pass in another AWS AMI resource as the source_ami.
in: Fetch AMI details to fileUses AWS CLI to verify specified AMI id/region exists and writes id and region files.
None right now.
Example template might look like this:
{
"variables": {
"role": "{{env `role`}}",
},
"builders": [
{
"type": "amazon-ebs",
"ami_name": "new-ami",
"source_ami": "ami-12345678",
"ssh_username": "ec2-user",
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"echo hello world"
]
}
]
}
Concourse config
resource_types:
- name: aws-ami
type: docker-image
source:
repository: aequitas/aws-ami-resource
resources:
- name: ami:integrationtest
type: aws-ami
jobs:
- name: build-ami
plan:
- get: src
- put: ami:test
params:
template_path: src/packer_template.json
build_vars:
role: test
Content type
Image
Digest
Size
59.3 MB
Last updated
over 10 years ago
docker pull aequitas/aws-ami-resource