Skip to content

Google backends: gcs and firestore (#35)#36

Merged
Igor Rodionov (goruha) merged 4 commits into
mainfrom
google-cloud-backend
Dec 3, 2024
Merged

Google backends: gcs and firestore (#35)#36
Igor Rodionov (goruha) merged 4 commits into
mainfrom
google-cloud-backend

Conversation

@goruha

@goruha Igor Rodionov (goruha) commented Dec 3, 2024

Copy link
Copy Markdown
Member

what

Use google services to store state (gcs) and metadata (firestore)

why

For those who use google cloud it is hard to adopt atmos as all the GH tooling is built around AWS. This PR and several other fixes that.

references

See also related PRs in:

Usage

To use the GCP implementation, specify planRepositoryType as gcs and metadataRepositoryType as firestore, then provide the following GCP-specific settings: googleProjectId to specify the project for both GCS bucket and Firestore, bucketName for GCS storage, and googleFirestoreDatabaseName/googleFirestoreCollectionName for Firestore metadata.

The component, stack, planPath, and action parameters work the same way as in AWS and Azure examples.

 - name: Store Plan
    uses: cloudposse/github-action-terraform-plan-storage@v2
    id: store-plan
    with:
      action: storePlan
      planPath: my-plan.tfplan
      component: mycomponent
      stack: core-mycomponent-use1
      planRepositoryType: gcs
      metadataRepositoryType: firestore
      bucketName: my-terraform-plans
      gcpProjectId: my-gcp-project
      gcpFirestoreDatabaseName: terraform-plan-metadata
      gcpFirestoreCollectionName: terraform-plan-storage

 - name: Get Plan
    uses: cloudposse/github-action-terraform-plan-storage@v2
    id: get-plan
    with:
      action: getPlan
      planPath: my-plan.tfplan
      component: mycomponent
      stack: core-mycomponent-use1
      planRepositoryType: gcs
      metadataRepositoryType: firestore
      bucketName: my-terraform-plans
      gcpProjectId: my-gcp-project
      gcpFirestoreDatabaseName: terraform-plan-metadata
      gcpFirestoreCollectionName: terraform-plan-storage

@milldr Dan Miller (milldr) added the major Breaking changes (or first stable release) label Dec 3, 2024
@goruha Igor Rodionov (goruha) merged commit 632bf29 into main Dec 3, 2024
@goruha Igor Rodionov (goruha) deleted the google-cloud-backend branch December 3, 2024 15:21
@github-actions

github-actions Bot commented Dec 3, 2024

Copy link
Copy Markdown

These changes were released in v2.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major Breaking changes (or first stable release)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants