open terraform/resource_backend_override.tf: no such file or directory
skdubey opened this issue · comments
Hi,
I have been trying to do a POC to runTerraform plan and apply from my local concourse setup to AWS account. However, I am getting attached error which unable to fix. While looking for error message I could see that it's related to some override key/value in more than one file, But even after removing all the reference and keeping that in pipeline confi only, I am still struck on same issue.
Error: "open terraform/resource_backend_override.tf: no such file or directory"
Pipeline config -
resource_types:
- name: terraform
type: docker-image
source:
repository: ljfranklin/terraform-resource
tag: latest
resources:
-
name: srcrepo
type: git
source:
uri: https://github.com/myuser/test.git
branch: master
username: myuser
password: mypass -
name: terraform
type: terraform
source:
terraform_source: terraform
env_name: ((environment))
delete_on_failure: true
backend_type: s3
backend_config:
access_key: ((aws_access_key))
secret_key: ((aws_secret_key))
bucket: ((s3_bucket))
region: ((aws_region))
key: dev/terraform.tfstate
jobs:
- name: create-cluster
public: true
plan:- get: srcrepo
params: {depth: 1} - put: terraform
params:
env_name: ((environment))
terraform_source: terraform
plan_only: ((plan_only))
vars:
access_key: ((aws_access_key))
secret_key: ((aws_secret_key))
region: ((aws_region))
s3_bucket: ((s3_bucket))
source_dir: "/tmp/build/put/git"
- get: srcrepo
That error is saying the terraform
directory given to terraform_source
doesn't exist. I added a better error message here to hopefully make that more clear. I'm guessing you want terraform_source: srcrepo/terraform
or similar. The source_dir: "/tmp/build/put/git"
value also looks suspicious, you probably want srcrepo
as well although I'm not sure why you would need to reference the source directory as a variable in the first place.
Thanks @ljfranklin for your response and suggestion. The error is vanished.
Closing this ticket. Issue is fixed.