Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform State Backend #80

Open
cdenneen opened this issue Aug 12, 2022 · 3 comments
Open

Terraform State Backend #80

cdenneen opened this issue Aug 12, 2022 · 3 comments
Labels
enhancement New feature or request jira

Comments

@cdenneen
Copy link

How can you set the terraform backend in pecdm?

Something like:

#! /bin/bash
PROJECT_ID="YOUR_PROJECT_ID" \
TF_USERNAME=${TF_USERNAME} \
TF_PASSWORD=${TF_PASSWORD} \
TF_ADDRESS="https://YOUR_GitLab_Domain/api/v4/projects/YOUR_PROJECT_ID/terraform/state/YOUR_State_File" \

terraform init \
  -backend-config=address=${TF_ADDRESS} \
  -backend-config=lock_address=${TF_ADDRESS}/lock \
  -backend-config=unlock_address=${TF_ADDRESS}/lock \
  -backend-config=username=${TF_USERNAME} \
  -backend-config=password=${TF_PASSWORD} \
  -backend-config=lock_method=POST \
  -backend-config=unlock_method=DELETE \
  -backend-config=retry_wait_min=5

Would be useful for CI/CD to run pecdm where the state can be stored.

This is just an example of a terraform http backend using GitLab but it could be any supported backend.

@cdenneen cdenneen added the enhancement New feature or request label Aug 12, 2022
@ody
Copy link
Member

ody commented Aug 16, 2022

We currently have no capability to leverage remote state in pecdm because of limitations in the terraform::initialize task. A feature request to add it to that module needs to precede anything prior to us enabling it in pecdm.

@davidsandilands
Copy link
Member

davidsandilands commented Oct 7, 2022

@cdenneen could you raise a feature request to https://[email protected]/puppetlabs/puppetlabs-terraform/issues I did speak to the internal Puppet team who said they would be happy to review contributions to this module but development would need to be lead by community

@davidsandilands
Copy link
Member

@cdenneen on discussion the @puppetlabs/solutions-architecture team has decided to implement this and will raise a feature request and develop this capability on the terraform module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jira
Projects
None yet
Development

No branches or pull requests

3 participants