Create an S3 bucket for testing
Create an AWS user with the following permissions:
{
"Version" : " 2012-10-17" ,
"Statement" : [
{
"Sid" : " Stmt1476735201000" ,
"Effect" : " Allow" ,
"NotAction" : " s3:DeleteBucket" ,
"Resource" : [
" arn:aws:s3:::YOUR_BUCKET" ,
" arn:aws:s3:::YOUR_BUCKET/*"
]
}
]
}
Create a GCP service account with Storage Object permission on a given GCS bucket
cp ./scripts/test.env.tpl ./tmp/test.env
Fill in ./tmp/test.env
with your creds
Run tests: source ./tmp/test.env && ./scripts/run-tests
Add / Updating dependencies
cd ./src/terraform-resource
go get -u github.com/FiloSottile/gvt
gvt fetch -tag=v1.4.11 github.com/aws/aws-sdk-go
git add vendor/ && git commit
Testing your changes in Concourse
Build a docker image with your changes:
./scripts/docker-build --image-name DOCKER_USER/IMAGE:TAG --terraform-url https://LATEST_TERRAFORM_URL.zip
Include the image in your pipeline:
resource_types :
- name : terraform
type : docker-image
source :
repository : DOCKER_USER/IMAGE:TAG
Run your pipeline and verify everything works as expected.
Submit your changes as a PR!