Modules for provisioning Cloud Storage buckets on Google Cloud Platform.
A Cloud Storage module that uses the init module as minimum input, while allowing overrides and additional configuration.
module "cloud-storage" {
source = "github.com/entur/terraform-google-cloud-storage//modules/cloud-storage?ref=v0.2.2"
...
}
See the README.md
under each module's subfolder for a list of supported inputs and outputs. For examples showing how they're implemented, check the examples subfolder.
You can control the version of a module dependency by adding ?ref=TAG
at the end of the source argument, as shown in the example above. This is highly recommended. You can find a list of available versions here.
Dependency automation tools such as Renovate Bot will be able to discover new releases and suggest updates automatically.
We welcome contributions to this repo. How to contribute:
terraform fmt
to format the Terraform codego:build
directive format used in the go files)gcloud auth application-default login
)This repository is versioned. Please see GitHub´s documentation describing how to create a new release.
The test setup is inspired by this Medium post.
To run the tests locally, make sure the prerequisites are in place. Make sure that you are running the go commands to test in the test
folder.
The test files have build tags, these can be used to run only a subset of the tests, for example like this: go test -v -tags=unit
.
In addition to a workflow running Terrascan on all git push events, a separate GitHub workflow is defined for testing the modules:
These run every time a change is pushed to GitHub, but filters in the workflows stops the tests from running when no changes is made in the modules.