From 8d4d60afdfde435a322276415191e84f6b5a9149 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 31 Oct 2023 14:12:41 +0100 Subject: [PATCH] Changed base image --- Dockerfile | 2 +- README.md | 13 +++++++------ tool.sh | 4 +++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7148bfd..ea1b3c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM hashicorp/terraform:1.6.2 +FROM hashicorp/tfci LABEL maintainer="docker@2martens.de" description="Terraform for Drone" RUN mkdir -p /opt/terraform/bin diff --git a/README.md b/README.md index 83706f7..4b7aa89 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ This Drone plugin uses the Terraform CLI and makes it compatible with Drone. - name: Step name image: 2martens/terraform-drone-plugin settings: + api_token: + cloud_organization: args: ``` @@ -30,14 +32,13 @@ clone: skip_verify: true steps: - - name: login to Terraform cloud - pull: always - image: 2martens/terraform-drone-plugin:1.26.2 - settings: - args: login - name: run plan pull: always - image: 2martens/terraform-drone-plugin:1.26.2 + image: 2martens/terraform-drone-plugin settings: + api_token: + from_secret: api_token + cloud_organization: + from_secret: cloud_organization args: plan ``` \ No newline at end of file diff --git a/tool.sh b/tool.sh index 2ff76de..dcc87d4 100644 --- a/tool.sh +++ b/tool.sh @@ -1,3 +1,5 @@ #!/bin/bash -terraform $PLUGIN_ARGS +TF_API_TOKEN=$PLUGIN_API_TOKEN\ + TF_CLOUD_ORGANIZATION=$PLUGIN_CLOUD_ORGANIZATION\ + tfci run $PLUGIN_ARGS