Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: provide Makefile, terraform-docs action, release-please action (#3
- Loading branch information
1 parent
22e13bd
commit d5fa08a
Showing
7 changed files
with
116 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Render Terraform Docs | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
terraform-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Render terraform docs inside the README.md and push changes back to PR branch | ||
uses: terraform-docs/gh-actions@v1.0.0 | ||
with: | ||
config-file: .terraform-docs.yml | ||
working-dir: . | ||
output-file: MODULE_SPECS.md | ||
output-method: inject | ||
git-push: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release Terraform Module | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
release-type: terraform-module | ||
default-branch: main | ||
pull-request-title-pattern: "ci: release ${version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Terraform Module Specifications | ||
|
||
This documentation shows the detailed specifications of the IAM bundle | ||
Terraform module. | ||
|
||
<!-- BEGIN_TF_DOCS --> | ||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_juju"></a> [juju](#provider\_juju) | 0.8.0 | | ||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.0 | | ||
| <a name="requirement_juju"></a> [juju](#requirement\_juju) | ~> 0.8.0 | | ||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_model"></a> [model](#input\_model) | The name of the Juju model to deploy to. | `string` | `"iam-bundle"` | no | | ||
| <a name="input_cloud"></a> [cloud](#input\_cloud) | The Juju cloud information. | <pre>object({<br> name = string<br> region = string<br> })</pre> | <pre>{<br> "name": "microk8s",<br> "region": "localhost"<br>}</pre> | no | | ||
| <a name="input_hydra"></a> [hydra](#input\_hydra) | The configurations of the Hydra application. | <pre>object({<br> units = optional(number, 1)<br> channel = optional(string, "edge")<br> series = optional(string, "jammy")<br> trust = optional(string, true)<br> config = optional(map(string), {})<br> })</pre> | `{}` | no | | ||
| <a name="input_kratos"></a> [kratos](#input\_kratos) | The configurations of the Kratos application. | <pre>object({<br> units = optional(number, 1)<br> channel = optional(string, "edge")<br> series = optional(string, "jammy")<br> trust = optional(string, true)<br> config = optional(map(string), {})<br> })</pre> | `{}` | no | | ||
| <a name="input_login_ui"></a> [login\_ui](#input\_login\_ui) | The configurations of the Identity Platform Login UI application. | <pre>object({<br> units = optional(number, 1)<br> trust = optional(bool, true)<br> config = optional(map(string), {})<br> channel = optional(string, "edge")<br> series = optional(string, "jammy")<br> })</pre> | `{}` | no | | ||
| <a name="input_idp_provider_config"></a> [idp\_provider\_config](#input\_idp\_provider\_config) | The external Idp provider configurations. | <pre>object({<br> client_id : string<br> issuer_url : optional(string)<br> provider : string<br> provider_id : string<br> scope : optional(string, "profile email address phone")<br> microsoft_tenant_id : optional(string)<br> apple_team_id : optional(string)<br> apple_private_key_id : optional(string)<br> })</pre> | <pre>{<br> "client_id": "client_id",<br> "provider": "generic",<br> "provider_id": "provider_id"<br>}</pre> | no | | ||
| <a name="input_idp_provider_credentials"></a> [idp\_provider\_credentials](#input\_idp\_provider\_credentials) | The external Idp provider credentials. | <pre>object({<br> client_secret : string<br> apple_private_key : optional(string)<br> })</pre> | <pre>{<br> "client_secret": "client_secret"<br>}</pre> | no | | ||
## Outputs | ||
|
||
No outputs. | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.PHONY: init fmt validate plan | ||
|
||
## help: Show help messages. | ||
help: | ||
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
|
||
## init: Initialize remote S3 backend. | ||
init: | ||
@terraform init | ||
|
||
## fmt: Format the Terraform module to a canonical format and style. | ||
fmt: | ||
@terraform fmt -recursive | ||
|
||
## validate: Check syntactical validation. | ||
validate: | ||
@terraform validate | ||
|
||
## plan: Plan the changes. | ||
plan: verify-var-file-set | ||
@terraform plan -var-files=${VAR_FILE} | ||
|
||
verify-var-file-set: | ||
ifndef VAR_FILE | ||
$(error VAR_FILE is not defined. Please provide VAR_FILE.) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters