I’m using Drone in version 0.8 and wanted to invoke deployment with custom param:
drone deploy -p VERSION_TAG=0.0.2 myrepo 10 dev
I want to use my param with Terraform plugin:
http://plugins.drone.io/jmccann/terraform/
like that:
terraform_dev_ecs_deploy:
image: jmccann/drone-terraform:6
...
root_dir: deployment
vars:
docker_image_tag: ${VERSION_TAG}
when:
event: deployment
environment: dev
but it’s not accessible that way. I was trying also other interpolation ways like:
$VERSION_TAG
$$VERSION_TAG
$${VERSION_TAG}
even:
my-step:
image: jmccann/drone-terraform:6
environment:
- TAG=${VERSION_TAG}
vars:
docker_image_tag: ${TAG}
but it’s not working. And my question is if it’s a problem with Plugin or I am doing something wrong with accessing this param?
I use drone deploy params in other image where in commands section I’m able to echo them:
drone deploy -p VERSION_REL=1.4.64 ...
mystep:
image: maven:3.6.1-jdk-11-slim
commands:
- echo $VERSION_REL
which is working.
I think issue is connected with plugin and go language so that I raised an issue https://github.com/jmccann/drone-terraform/issues/97 but just wanted to ask if there’s maybe a way to access params different way or they are only pass as environment variables.