Compare commits

...

4 Commits

Author SHA1 Message Date
c6cc1ac86a Merge pull request 'ci: drift-detection and docs with terraform-docs' (#1) from ci-drifts-docs into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #1
2022-06-13 22:50:06 +00:00
8886ca2da8 format: terraform fmt
All checks were successful
continuous-integration/drone/pr Build is passing
2022-06-14 00:35:24 +02:00
e548712b02 ci: fix drone signature
Some checks failed
continuous-integration/drone/pr Build is failing
2022-06-14 00:34:06 +02:00
149a7e6cce ci: drift-detection and docs with terraform-docs
Some checks are pending
continuous-integration/drone/pr Build is pending
2022-06-14 00:30:57 +02:00
5 changed files with 96 additions and 11 deletions

View File

@@ -4,11 +4,9 @@ type: kubernetes
name: Terraform root module
trigger:
event:
- cron
- push
branch:
- main
ref:
- refs/heads/main
- refs/pull/*/head
environment:
TF_IN_AUTOMATION: "1"
@@ -34,7 +32,7 @@ steps:
- name: terraform plan
image: hashicorp/terraform:1.1.8
commands:
- terraform plan -out .tfplan
- terraform plan $([[ $${DRONE_BUILD_EVENT} = cron ]] && echo "-detailed-exit-code") -out .tfplan
environment:
AWS_ACCESS_KEY_ID:
from_secret: terraform-aws-key-id
@@ -65,8 +63,30 @@ steps:
KUBE_TOKEN:
from_secret: lawndale-k8s-ci-token
---
kind: pipeline
type: kubernetes
name: Check docs and format
environment:
TF_IN_AUTOMATION: "1"
trigger:
ref:
- refs/pull/*/head
steps:
- name: format and generate docs
image: hashicorp/terraform:1.1.8
commands:
- apk add bash wget
- wget -q https://github.com/terraform-docs/terraform-docs/releases/download/v0.16.0/terraform-docs-v0.16.0-linux-amd64.tar.gz -O - | tar -xz terraform-docs -C /usr/local/bin
- terraform fmt
- terraform-docs .
- git diff --exit-code
---
kind: signature
hmac: 6950738d3bbe37bb7d5201b9fd7a086ee09a2206a433f19d01c2570cc5718b61
hmac: a612a515b91b36df9b5065b3d6e8933053840fe8a6c3e5ee1e3c6a6e66be5040
...

5
.terraform-docs.yml Normal file
View File

@@ -0,0 +1,5 @@
formatter: markdown document
output:
mode: inject
file: README.md

View File

@@ -32,3 +32,63 @@ Sources:
## Persistent volume
Persistence is supported by [terraform-modules//9p-persistent-volume](git.thomasklein.me/thomasklein/terraform-modules/9p-persistent-volume).
<!-- BEGIN_TF_DOCS -->
## Requirements
The following requirements are needed by this module:
- <a name="requirement_aws"></a> [aws](#requirement\_aws) (~> 4.9.0)
- <a name="requirement_gitea"></a> [gitea](#requirement\_gitea) (>= 0.1.0)
- <a name="requirement_helm"></a> [helm](#requirement\_helm) (2.5.1)
- <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) (2.11.0)
## Providers
The following providers are used by this module:
- <a name="provider_gitea"></a> [gitea](#provider\_gitea) (0.1.0)
- <a name="provider_helm"></a> [helm](#provider\_helm) (2.5.1)
- <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) (2.11.0)
- <a name="provider_random"></a> [random](#provider\_random) (3.2.0)
## Modules
The following Modules are called:
### <a name="module_drone_persistance"></a> [drone\_persistance](#module\_drone\_persistance)
Source: git@git.thomasklein.me:thomasklein/terraform-modules//9p-persistent-volume
Version:
## Resources
The following resources are used by this module:
- [gitea_oauth2_app.this](https://registry.terraform.io/providers/malarinv/gitea/latest/docs/resources/oauth2_app) (resource)
- [helm_release.drone_runner](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) (resource)
- [helm_release.drone_server](https://registry.terraform.io/providers/hashicorp/helm/2.5.1/docs/resources/release) (resource)
- [kubernetes_namespace.jobs](https://registry.terraform.io/providers/hashicorp/kubernetes/2.11.0/docs/resources/namespace) (resource)
- [kubernetes_namespace.server](https://registry.terraform.io/providers/hashicorp/kubernetes/2.11.0/docs/resources/namespace) (resource)
- [random_password.drone_rpc_secret](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) (resource)
## Required Inputs
No required inputs.
## Optional Inputs
No optional inputs.
## Outputs
No outputs.
<!-- END_TF_DOCS -->