Skip to content

osinfra-io/pt-arche-google-storage-bucket

Google Cloud Platform - Storage Bucket OpenTofu Module

OpenTofu Tests Dependabot Datadog Security Enabled

Repository Description

OpenTofu example module that creates a Google Cloud Storage bucket with uniform bucket-level access enforced, public access prevention, and optional object versioning. It supports customer-managed encryption keys (CMEK) and a configurable storage class (STANDARD, NEARLINE, COLDLINE, ARCHIVE, etc.).

🔩 Usage

Tip

You can check the tests/fixtures directory for example configurations. These fixtures set up the system for testing by providing all the necessary initial code, thus creating good examples on which to base your configurations.

Google project services must be enabled before using this module. As a best practice, these should be defined in the pt-arche-google-project module. The following services are required:

  • storage.googleapis.com

🛠️ Tools

📋 Skills and Knowledge

Links to documentation and other resources required to develop and iterate in this repository successfully.

🔍 Tests

All tests are mocked allowing us to test the module without creating infrastructure or requiring credentials. The trade-offs are acceptable in favor of speed and simplicity. In an OpenTofu test, a mocked provider or resource will generate fake data for all computed attributes that would normally be provided by the underlying provider APIs.

tofu init
tofu test

📦 Release

To release a new version, simply push a new tag to the repository. The tag should be in the format vX.Y.Z where X, Y, and Z are integers.

git tag vX.Y.Z
git push origin vX.Y.Z

About

OpenTofu example module that creates a Google Cloud Storage bucket with uniform bucket-level access, public access prevention, optional object versioning, and customer-managed encryption key support.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Sponsor this project

 

Contributors

Languages