Skip to content

Support GCS as a Terraform Module Source #20987

@SubatomicHero

Description

@SubatomicHero

Current Terraform Version

Terraform v0.11.13

Use-cases

Terraform currently supports S3 as a Module Source. We only use GCP so want to be able to use GCS as a Module Source

Attempted Solutions

A workaround I am currently using is to use Google Storage Interoperability. This provides AWS keys used for API calls to a S3 like protocol. Doing this I:

  • Created the keys
  • Exported the keys as environment variables
  • Use S3 as a module source e.g.
module "my_module" {
  source = "s3::https://storage.googleapis.com/modules-bucket/awesome-module.tar.gz"
}

Proposal

Ideally this solution should work as such:

  1. source = "gcs::https://storage.googleapis.com/modules-bucket/awesome-module.tar.gz"
  2. Under the hood, Terraform uses a service account to authenticate

References

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions