From fa58a9d255547e570713a9aa89f014d305397fb3 Mon Sep 17 00:00:00 2001 From: Toshiya-Kato Date: Sat, 10 Feb 2024 23:42:39 +0900 Subject: [PATCH] fix --- action.yml | 4 +++- entrypoint.sh | 4 +++- testdata/.gitignore | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 testdata/.gitignore diff --git a/action.yml b/action.yml index 5eef415..74e515f 100644 --- a/action.yml +++ b/action.yml @@ -29,8 +29,10 @@ inputs: description: 'Additional reviewdog flags' default: '' ### Variables for terraform validate ### + terraform_init_options: + description: 'options for terraform init to pass backend configuration and so on' envvar: - description: 'Environment variables for terraform init' + description: 'Environment variables for terraform init to pass backend configuration' terraform_version: description: 'The terraform version to install and use. The default is `latest`' runs: diff --git a/entrypoint.sh b/entrypoint.sh index 58fb2eb..3f3198a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,7 +11,9 @@ echo "${INPUT_ENVVAR}" | while IFS= read -r line; do export line done -terraform init +printenv + +terraform init ${INPUT_TERRAFORM_INIT_OPTIONS} terraform validate -json \ | jq -r '.diagnostics[] | "\(.range.filename):\(.range.start.line):\(.range.start.column): \(.detail)"' \ | reviewdog -efm="%f:%l:%c:%m" \ diff --git a/testdata/.gitignore b/testdata/.gitignore deleted file mode 100644 index c035e72..0000000 --- a/testdata/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.terraform -.terraform.lock.hcl