11# Terraform Module GCS Publisher
22
3- A GitHub Action for publishing Terraform modules to Google Cloud Storage (GCS) buckets with proper versioning.
3+ A GitHub Action for publishing Terraform modules to Google Cloud Storage (GCS)
4+ buckets with proper versioning.
45
56[ ![ GitHub Marketplace] ( https://img.shields.io/badge/Marketplace-Terraform%20Module%20GCS%20Publisher-blue.svg?colorA=24292e&colorB=0366d6&style=flat&longCache=true&logo=github )] ( https://github.com/marketplace/actions/terraform-module-gcs-publisher )
67
78## Overview
89
9- This action helps you automate the process of publishing Terraform modules to GCS buckets, which can be used as a private Terraform module registry. It handles:
10+ This action helps you automate the process of publishing Terraform modules to
11+ GCS buckets, which can be used as a private Terraform module registry. It
12+ handles:
1013
1114- Packaging Terraform modules into zip files
1215- Uploading modules to GCS with proper versioning
3639 runs-on : ubuntu-latest
3740 steps :
3841 - uses : actions/checkout@v3
39-
42+
4043 - name : Publish Terraform Module
4144 uses : infraspecdev/terraform-module-gcs-publisher@v1
4245 with :
@@ -51,34 +54,36 @@ jobs:
5154
5255## Inputs
5356
54- | Input | Description | Required | Default |
55- |-------| -------------| ----------| --------- |
56- | ` gcs-bucket` | GCS bucket name where Terraform modules will be stored | Yes | |
57- | `module-name` | Name of the Terraform module | Yes | |
58- | `module-version` | Version of the Terraform module (semver format) | Yes | |
59- | `module-path` | Path to the Terraform module directory | Yes | `.` |
60- | `google-credentials` | Google Cloud service account credentials (JSON) | Yes | |
61- | `delete-old-versions` | Whether to delete old versions of the module | No | `false` |
62- | `keep-versions` | Number of old versions to keep when deleting old versions | No | `5` |
57+ | Input | Description | Required | Default |
58+ | --------------------- | --------------------------------------------------------- | -------- | ------- |
59+ | ` gcs-bucket` | GCS bucket name where Terraform modules will be stored | Yes | |
60+ | `module-name` | Name of the Terraform module | Yes | |
61+ | `module-version` | Version of the Terraform module (semver format) | Yes | |
62+ | `module-path` | Path to the Terraform module directory | Yes | `.` |
63+ | `google-credentials` | Google Cloud service account credentials (JSON) | Yes | |
64+ | `delete-old-versions` | Whether to delete old versions of the module | No | `false` |
65+ | `keep-versions` | Number of old versions to keep when deleting old versions | No | `5` |
6366
6467# # Outputs
6568
66- | Output | Description |
67- |--------| -------------|
68- | `module-url` | URL of the uploaded Terraform module |
69- | `version` | Version of the uploaded Terraform module |
69+ | Output | Description |
70+ | ------------ | ---------------------------------------- |
71+ | `module-url` | URL of the uploaded Terraform module |
72+ | `version` | Version of the uploaded Terraform module |
7073
7174# # Using Published Modules
7275
73- You can reference the modules in your Terraform code by specifying the exact version :
76+ You can reference the modules in your Terraform code by specifying the exact
77+ version :
7478
7579` ` ` hcl
7680module "vpc" {
7781 source = "gcs::https://storage.googleapis.com/your-terraform-modules-bucket/modules/vpc/vpc-1.0.0.zip"
7882}
7983` ` `
8084
81- This approach ensures consistent and predictable deployments by pinning to specific module versions.
85+ This approach ensures consistent and predictable deployments by pinning to
86+ specific module versions.
8287
8388# # Setting Up GCP Permissions
8489
@@ -91,8 +96,11 @@ The service account used by this GitHub Action needs the following permissions:
9196
9297# # Contributing
9398
94- Contributions are welcome. Submit a Pull Request to contribute to this project.
99+ Contributions are welcome. Please see [DEVELOPMENT.md](DEVELOPMENT.md) for
100+ development setup, guidelines, and workflow information. Submit a Pull Request
101+ to contribute to this project.
95102
96103# # License
97104
98- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
105+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
106+ for details.
0 commit comments