Skip to content

Conversation

@goruha
Copy link
Member

@goruha goruha commented Dec 3, 2024

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

@goruha goruha requested review from a team as code owners December 3, 2024 14:30
gberenice
gberenice previously approved these changes Dec 3, 2024
@milldr milldr added the major Breaking changes (or first stable release) label Dec 3, 2024
@goruha goruha merged commit 632bf29 into main Dec 3, 2024
12 checks passed
@goruha goruha deleted the google-cloud-backend branch December 3, 2024 15:21
@github-actions
Copy link

github-actions bot commented Dec 3, 2024

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.

5 participants