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

Use tfstate-lookup with GCS buckets backend #47

Merged
merged 2 commits into from
May 2, 2021

Conversation

dex4er
Copy link
Contributor

@dex4er dex4er commented Apr 26, 2021

Thi new version of tfstate-lookup supports GCS bucket so this is possible to run something like:

echo 'name: ref+tfstate:////home/piotr.roszatycki/Terraform/test/.terraform/terraform.tfstate/module.cluster-test.helm_release.velero.name' | vals eval -f -
name: velero

where terraform.tfstate file contains something like:

{
    "version": 3,
    "serial": 1,
    "lineage": "a0b37c38-a66d-11eb-8386-00155d223a60",
    "backend": {
        "type": "gcs",
        "config": {
            "access_token": null,
            "bucket": "test-terraform-state",
            "credentials": null,
            "encryption_key": null,
            "impersonate_service_account": null,
            "impersonate_service_account_delegates": null,
            "path": null,
            "prefix": null,
            "project": null,
            "region": null
        },
        "hash": 2718492160
    },
    "modules": [
        {
            "path": [
                "root"
            ],
            "outputs": {},
            "resources": {},
            "depends_on": []
        }
    ]
}

It should solve #38

Copy link
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks a lot for your contribution @dex4er ☺️

@mumoshu mumoshu merged commit 96c619b into helmfile:master May 2, 2021
@dex4er dex4er deleted the tfstate-lookup-with-gsc branch May 2, 2021 14:43
mumoshu pushed a commit that referenced this pull request May 3, 2021
Adds new schemes that can allow uses of direct path to Terraform state in the bucket: one for GCS another for S3.

The change requires #47 to be applied first as it supports GCS buckets implemented by tfstate-lookup v0.2.0

Resolves #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants