From 586f93f47327f3c8ec75f6f9040ae80401dd6cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Thu, 21 Dec 2023 09:10:25 +0100 Subject: [PATCH] chore: start generating module docs --- .github/workflows/ci.yaml | 21 +++++++++ Makefile | 13 +++++ README.md | 16 +++---- docs/.terraform-docs-example.yaml | 9 ++++ docs/.terraform-docs.yaml | 14 ++++++ examples/sqs/README.md | 47 +++++++++++++++++++ examples/{ => sqs}/main.tf | 0 examples/{ => sqs}/providers.tf | 0 examples/sqs/terraform.tfvars.example | 8 ++++ .../ecr-create-repository/README.md | 32 +++++++++++++ .../terraform.tfvars.example | 6 +++ .../iam-policy/s3-admin/README.md | 33 +++++++++++++ .../s3-admin/terraform.tfvars.example | 7 +++ .../iam-policy/sqs-admin/README.md | 33 +++++++++++++ .../sqs-admin/terraform.tfvars.example | 7 +++ .../iam-role/service-account/README.md | 35 ++++++++++++++ .../service-account/terraform.tfvars.example | 9 ++++ .../k8s/service-account/README.md | 27 +++++++++++ .../service-account/terraform.tfvars.example | 1 + humanitec-resource-defs/s3/basic/README.md | 33 +++++++++++++ .../s3/basic/terraform.tfvars.example | 7 +++ humanitec-resource-defs/sqs/basic/README.md | 33 +++++++++++++ .../sqs/basic/terraform.tfvars.example | 7 +++ .../workload/service-account/README.md | 27 +++++++++++ .../service-account/terraform.tfvars.example | 1 + .../ecr-create-repository/README.md | 39 +++++++++++++++ .../terraform.tfvars.example | 7 +++ modules/iam-policy/s3-admin/README.md | 40 ++++++++++++++++ .../s3-admin/terraform.tfvars.example | 8 ++++ modules/iam-policy/sqs-admin/README.md | 40 ++++++++++++++++ .../sqs-admin/terraform.tfvars.example | 8 ++++ modules/iam-role/service-account/README.md | 45 ++++++++++++++++++ .../service-account/terraform.tfvars.example | 11 +++++ modules/s3/basic/README.md | 43 +++++++++++++++++ modules/s3/basic/terraform.tfvars.example | 8 ++++ modules/sqs/basic/README.md | 34 ++++++++++++++ modules/sqs/basic/terraform.tfvars.example | 7 +++ 37 files changed, 708 insertions(+), 8 deletions(-) create mode 100644 docs/.terraform-docs-example.yaml create mode 100644 docs/.terraform-docs.yaml create mode 100644 examples/sqs/README.md rename examples/{ => sqs}/main.tf (100%) rename examples/{ => sqs}/providers.tf (100%) create mode 100644 examples/sqs/terraform.tfvars.example create mode 100644 humanitec-resource-defs/iam-policy/ecr-create-repository/README.md create mode 100644 humanitec-resource-defs/iam-policy/ecr-create-repository/terraform.tfvars.example create mode 100644 humanitec-resource-defs/iam-policy/s3-admin/README.md create mode 100644 humanitec-resource-defs/iam-policy/s3-admin/terraform.tfvars.example create mode 100644 humanitec-resource-defs/iam-policy/sqs-admin/README.md create mode 100644 humanitec-resource-defs/iam-policy/sqs-admin/terraform.tfvars.example create mode 100644 humanitec-resource-defs/iam-role/service-account/README.md create mode 100644 humanitec-resource-defs/iam-role/service-account/terraform.tfvars.example create mode 100644 humanitec-resource-defs/k8s/service-account/README.md create mode 100644 humanitec-resource-defs/k8s/service-account/terraform.tfvars.example create mode 100644 humanitec-resource-defs/s3/basic/README.md create mode 100644 humanitec-resource-defs/s3/basic/terraform.tfvars.example create mode 100644 humanitec-resource-defs/sqs/basic/README.md create mode 100644 humanitec-resource-defs/sqs/basic/terraform.tfvars.example create mode 100644 humanitec-resource-defs/workload/service-account/README.md create mode 100644 humanitec-resource-defs/workload/service-account/terraform.tfvars.example create mode 100644 modules/iam-policy/ecr-create-repository/README.md create mode 100644 modules/iam-policy/ecr-create-repository/terraform.tfvars.example create mode 100644 modules/iam-policy/s3-admin/README.md create mode 100644 modules/iam-policy/s3-admin/terraform.tfvars.example create mode 100644 modules/iam-policy/sqs-admin/README.md create mode 100644 modules/iam-policy/sqs-admin/terraform.tfvars.example create mode 100644 modules/iam-role/service-account/README.md create mode 100644 modules/iam-role/service-account/terraform.tfvars.example create mode 100644 modules/s3/basic/README.md create mode 100644 modules/s3/basic/terraform.tfvars.example create mode 100644 modules/sqs/basic/README.md create mode 100644 modules/sqs/basic/terraform.tfvars.example diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 841f6ad..7992f7e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,10 +9,31 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: hashicorp/setup-terraform@v2 with: terraform_version: ~1.5 + + - name: Terraform Version + run: terraform -version + + - name: Install terraform-docs + run: | + WORK_DIR=$(mktemp -d) + curl -Lo ${WORK_DIR}/terraform-docs.tar.gz https://github.com/terraform-docs/terraform-docs/releases/download/v0.16.0/terraform-docs-v0.16.0-$(uname)-amd64.tar.gz + cd ${WORK_DIR} + tar -xzf terraform-docs.tar.gz + chmod +x terraform-docs + mv terraform-docs /usr/local/bin/terraform-docs + + - name: Generate docs + run: make docs + + - name: Check git diff is clean (all files generated should be committed) + run: git diff --exit-code + - name: Terraform Format Check run: make fmt-check + - name: Terraform Validate run: make validate diff --git a/Makefile b/Makefile index 4bd99fa..2a47904 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,18 @@ TF_DIRS = $(patsubst %/main.tf, %, $(shell find . -type d -name .terraform -prune -o -name 'main.tf' -print)) VALIDATE_TF_DIRS = $(addprefix validate-,$(TF_DIRS)) +DOCS_TF_DIRS = $(addprefix docs-,$(TF_DIRS)) + + +# Generate docs for a terraform directories +$(DOCS_TF_DIRS): docs-%: + @echo "Docs $*" + terraform-docs --config docs/.terraform-docs.yaml $* + terraform-docs --config docs/.terraform-docs-example.yaml $* + +# Generate docs +.PHONY: docs +docs: $(DOCS_TF_DIRS) + @echo "All docs generated" # Format all terraform files fmt: diff --git a/README.md b/README.md index cdddde5..b8b7558 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,14 @@ A collection of AWS resources ready to be used with [Humanitec](https://humanite The following resources are included: -* `iam-policy/ecr-create-repository`: IAM policy for to create ECR repositories. -* `iam-policy/s3-admin`: IAM policy for admin access for a S3 bucket. -* `iam-policy/sqs-admin`: IAM policy for admin access for an SQS queue. -* `iam-role/service-account`: An assumable IAM role, by a k8s service account. -* `k8s/service-account`: A k8s service account linked to an IAM role. -* `s3/basic`: A basic S3 bucket. -* `sqs/basic`: A basic SQS queue. -* `workload/service-account`: A workload service account. +* [iam-policy/ecr-create-repository](./humanitec-resource-defs/iam-policy/ecr-create-repository): IAM policy for to create ECR repositories. +* [iam-policy/s3-admin](./humanitec-resource-defs/iam-policy/s3-admin): IAM policy for admin access for a S3 bucket. +* [iam-policy/sqs-admin](./humanitec-resource-defs/iam-policy/sqs-admin): IAM policy for admin access for an SQS queue. +* [iam-role/service-account](./humanitec-resource-defs/iam-role/service-account): An assumable IAM role, by a k8s service account. +* [k8s/service-account](./humanitec-resource-defs/k8s/service-account): A k8s service account linked to an IAM role. +* [s3/basic](./humanitec-resource-defs/s3/basic): A basic S3 bucket. +* [sqs/basic](./humanitec-resource-defs/sqs/basic): A basic SQS queue. +* [workload/service-account](./humanitec-resource-defs/workload/service-account): A workload service account. The `humanitec-resource-defs` directory includes the respective resource definitions. diff --git a/docs/.terraform-docs-example.yaml b/docs/.terraform-docs-example.yaml new file mode 100644 index 0000000..4bf5908 --- /dev/null +++ b/docs/.terraform-docs-example.yaml @@ -0,0 +1,9 @@ +formatter: "tfvars hcl" + +output: + file: "./terraform.tfvars.example" + mode: replace + template: "{{ .Content }}" + +settings: + description: true diff --git a/docs/.terraform-docs.yaml b/docs/.terraform-docs.yaml new file mode 100644 index 0000000..702851b --- /dev/null +++ b/docs/.terraform-docs.yaml @@ -0,0 +1,14 @@ +formatter: "markdown table" + +output: + file: "./README.md" + +sort: + enabled: true + by: required + + +settings: + anchor: false + hide-empty: true + lockfile: false diff --git a/examples/sqs/README.md b/examples/sqs/README.md new file mode 100644 index 0000000..c8b4fc2 --- /dev/null +++ b/examples/sqs/README.md @@ -0,0 +1,47 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| iam\_policy\_s3\_admin | ../humanitec-resource-defs/iam-policy/s3-admin | n/a | +| iam\_policy\_sqs\_admin | ../humanitec-resource-defs/iam-policy/sqs-admin | n/a | +| iam\_role\_service\_account | ../humanitec-resource-defs/iam-role/service-account | n/a | +| k8s\_service\_account | ../humanitec-resource-defs/k8s/service-account | n/a | +| s3\_basic | ../humanitec-resource-defs/s3/basic | n/a | +| sqs\_basic | ../humanitec-resource-defs/sqs/basic | n/a | +| workload | ../humanitec-resource-defs/workload/service-account | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_application.example](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/application) | resource | +| [humanitec_resource_definition_criteria.iam_policy_s3_admin](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | +| [humanitec_resource_definition_criteria.iam_policy_sqs_admin](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | +| [humanitec_resource_definition_criteria.iam_role_service_account](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | +| [humanitec_resource_definition_criteria.k8s_service_account](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | +| [humanitec_resource_definition_criteria.s3_basic](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | +| [humanitec_resource_definition_criteria.sqs_basic](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | +| [humanitec_resource_definition_criteria.workload](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition_criteria) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| humanitec\_organization | n/a | `string` | n/a | yes | +| oidc\_provider | n/a | `string` | n/a | yes | +| oidc\_provider\_arn | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | +| name | n/a | `string` | `"item-list"` | no | +| region | n/a | `string` | `"eu-central-1"` | no | +| resource\_packs\_aws\_rev | n/a | `string` | `"refs/heads/main"` | no | + \ No newline at end of file diff --git a/examples/main.tf b/examples/sqs/main.tf similarity index 100% rename from examples/main.tf rename to examples/sqs/main.tf diff --git a/examples/providers.tf b/examples/sqs/providers.tf similarity index 100% rename from examples/providers.tf rename to examples/sqs/providers.tf diff --git a/examples/sqs/terraform.tfvars.example b/examples/sqs/terraform.tfvars.example new file mode 100644 index 0000000..1a94e4d --- /dev/null +++ b/examples/sqs/terraform.tfvars.example @@ -0,0 +1,8 @@ +access_key = "" +humanitec_organization = "" +name = "item-list" +oidc_provider = "" +oidc_provider_arn = "" +region = "eu-central-1" +resource_packs_aws_rev = "refs/heads/main" +secret_key = "" \ No newline at end of file diff --git a/humanitec-resource-defs/iam-policy/ecr-create-repository/README.md b/humanitec-resource-defs/iam-policy/ecr-create-repository/README.md new file mode 100644 index 0000000..3fe2344 --- /dev/null +++ b/humanitec-resource-defs/iam-policy/ecr-create-repository/README.md @@ -0,0 +1,32 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| humanitec\_organization | n/a | `string` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| resource\_packs\_aws\_rev | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| id | n/a | + \ No newline at end of file diff --git a/humanitec-resource-defs/iam-policy/ecr-create-repository/terraform.tfvars.example b/humanitec-resource-defs/iam-policy/ecr-create-repository/terraform.tfvars.example new file mode 100644 index 0000000..01c4949 --- /dev/null +++ b/humanitec-resource-defs/iam-policy/ecr-create-repository/terraform.tfvars.example @@ -0,0 +1,6 @@ +access_key = "" +humanitec_organization = "" +prefix = "" +region = "" +resource_packs_aws_rev = "" +secret_key = "" \ No newline at end of file diff --git a/humanitec-resource-defs/iam-policy/s3-admin/README.md b/humanitec-resource-defs/iam-policy/s3-admin/README.md new file mode 100644 index 0000000..9337a40 --- /dev/null +++ b/humanitec-resource-defs/iam-policy/s3-admin/README.md @@ -0,0 +1,33 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| humanitec\_organization | n/a | `string` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| resource\_packs\_aws\_rev | n/a | `string` | n/a | yes | +| s3\_resource\_definition\_class | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| id | n/a | + \ No newline at end of file diff --git a/humanitec-resource-defs/iam-policy/s3-admin/terraform.tfvars.example b/humanitec-resource-defs/iam-policy/s3-admin/terraform.tfvars.example new file mode 100644 index 0000000..7a4c6aa --- /dev/null +++ b/humanitec-resource-defs/iam-policy/s3-admin/terraform.tfvars.example @@ -0,0 +1,7 @@ +access_key = "" +humanitec_organization = "" +prefix = "" +region = "" +resource_packs_aws_rev = "" +s3_resource_definition_class = "" +secret_key = "" \ No newline at end of file diff --git a/humanitec-resource-defs/iam-policy/sqs-admin/README.md b/humanitec-resource-defs/iam-policy/sqs-admin/README.md new file mode 100644 index 0000000..0586289 --- /dev/null +++ b/humanitec-resource-defs/iam-policy/sqs-admin/README.md @@ -0,0 +1,33 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| humanitec\_organization | n/a | `string` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| resource\_packs\_aws\_rev | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | +| sqs\_resource\_definition\_class | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| id | n/a | + \ No newline at end of file diff --git a/humanitec-resource-defs/iam-policy/sqs-admin/terraform.tfvars.example b/humanitec-resource-defs/iam-policy/sqs-admin/terraform.tfvars.example new file mode 100644 index 0000000..4334e78 --- /dev/null +++ b/humanitec-resource-defs/iam-policy/sqs-admin/terraform.tfvars.example @@ -0,0 +1,7 @@ +access_key = "" +humanitec_organization = "" +prefix = "" +region = "" +resource_packs_aws_rev = "" +secret_key = "" +sqs_resource_definition_class = "" \ No newline at end of file diff --git a/humanitec-resource-defs/iam-role/service-account/README.md b/humanitec-resource-defs/iam-role/service-account/README.md new file mode 100644 index 0000000..f880ff7 --- /dev/null +++ b/humanitec-resource-defs/iam-role/service-account/README.md @@ -0,0 +1,35 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| humanitec\_organization | n/a | `string` | n/a | yes | +| oidc\_provider | n/a | `string` | n/a | yes | +| oidc\_provider\_arn | n/a | `string` | n/a | yes | +| policy\_classes | n/a | `list(string)` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| resource\_packs\_aws\_rev | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| id | n/a | + \ No newline at end of file diff --git a/humanitec-resource-defs/iam-role/service-account/terraform.tfvars.example b/humanitec-resource-defs/iam-role/service-account/terraform.tfvars.example new file mode 100644 index 0000000..74e12f9 --- /dev/null +++ b/humanitec-resource-defs/iam-role/service-account/terraform.tfvars.example @@ -0,0 +1,9 @@ +access_key = "" +humanitec_organization = "" +oidc_provider = "" +oidc_provider_arn = "" +policy_classes = "" +prefix = "" +region = "" +resource_packs_aws_rev = "" +secret_key = "" \ No newline at end of file diff --git a/humanitec-resource-defs/k8s/service-account/README.md b/humanitec-resource-defs/k8s/service-account/README.md new file mode 100644 index 0000000..245f109 --- /dev/null +++ b/humanitec-resource-defs/k8s/service-account/README.md @@ -0,0 +1,27 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| prefix | n/a | `string` | `""` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| id | n/a | + \ No newline at end of file diff --git a/humanitec-resource-defs/k8s/service-account/terraform.tfvars.example b/humanitec-resource-defs/k8s/service-account/terraform.tfvars.example new file mode 100644 index 0000000..95169cd --- /dev/null +++ b/humanitec-resource-defs/k8s/service-account/terraform.tfvars.example @@ -0,0 +1 @@ +prefix = "" \ No newline at end of file diff --git a/humanitec-resource-defs/s3/basic/README.md b/humanitec-resource-defs/s3/basic/README.md new file mode 100644 index 0000000..6e22a81 --- /dev/null +++ b/humanitec-resource-defs/s3/basic/README.md @@ -0,0 +1,33 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| humanitec\_organization | n/a | `string` | n/a | yes | +| policy\_classes | n/a | `list(string)` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| resource\_packs\_aws\_rev | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| id | n/a | + \ No newline at end of file diff --git a/humanitec-resource-defs/s3/basic/terraform.tfvars.example b/humanitec-resource-defs/s3/basic/terraform.tfvars.example new file mode 100644 index 0000000..dc41053 --- /dev/null +++ b/humanitec-resource-defs/s3/basic/terraform.tfvars.example @@ -0,0 +1,7 @@ +access_key = "" +humanitec_organization = "" +policy_classes = "" +prefix = "" +region = "" +resource_packs_aws_rev = "" +secret_key = "" \ No newline at end of file diff --git a/humanitec-resource-defs/sqs/basic/README.md b/humanitec-resource-defs/sqs/basic/README.md new file mode 100644 index 0000000..6e22a81 --- /dev/null +++ b/humanitec-resource-defs/sqs/basic/README.md @@ -0,0 +1,33 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| humanitec\_organization | n/a | `string` | n/a | yes | +| policy\_classes | n/a | `list(string)` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| resource\_packs\_aws\_rev | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| id | n/a | + \ No newline at end of file diff --git a/humanitec-resource-defs/sqs/basic/terraform.tfvars.example b/humanitec-resource-defs/sqs/basic/terraform.tfvars.example new file mode 100644 index 0000000..dc41053 --- /dev/null +++ b/humanitec-resource-defs/sqs/basic/terraform.tfvars.example @@ -0,0 +1,7 @@ +access_key = "" +humanitec_organization = "" +policy_classes = "" +prefix = "" +region = "" +resource_packs_aws_rev = "" +secret_key = "" \ No newline at end of file diff --git a/humanitec-resource-defs/workload/service-account/README.md b/humanitec-resource-defs/workload/service-account/README.md new file mode 100644 index 0000000..245f109 --- /dev/null +++ b/humanitec-resource-defs/workload/service-account/README.md @@ -0,0 +1,27 @@ + + + +## Providers + +| Name | Version | +|------|---------| +| humanitec | n/a | + +## Resources + +| Name | Type | +|------|------| +| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| prefix | n/a | `string` | `""` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| id | n/a | + \ No newline at end of file diff --git a/humanitec-resource-defs/workload/service-account/terraform.tfvars.example b/humanitec-resource-defs/workload/service-account/terraform.tfvars.example new file mode 100644 index 0000000..95169cd --- /dev/null +++ b/humanitec-resource-defs/workload/service-account/terraform.tfvars.example @@ -0,0 +1 @@ +prefix = "" \ No newline at end of file diff --git a/modules/iam-policy/ecr-create-repository/README.md b/modules/iam-policy/ecr-create-repository/README.md new file mode 100644 index 0000000..638eedc --- /dev/null +++ b/modules/iam-policy/ecr-create-repository/README.md @@ -0,0 +1,39 @@ + +## Requirements + +| Name | Version | +|------|---------| +| terraform | >= 1.3.0 | +| aws | ~> 5.0 | + +## Providers + +| Name | Version | +|------|---------| +| aws | ~> 5.0 | + +## Resources + +| Name | Type | +|------|------| +| [aws_iam_policy.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource | +| [aws_iam_policy_document.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| app\_id | n/a | `string` | n/a | yes | +| env\_id | n/a | `string` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| res\_id | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| arn | n/a | + \ No newline at end of file diff --git a/modules/iam-policy/ecr-create-repository/terraform.tfvars.example b/modules/iam-policy/ecr-create-repository/terraform.tfvars.example new file mode 100644 index 0000000..6936f9f --- /dev/null +++ b/modules/iam-policy/ecr-create-repository/terraform.tfvars.example @@ -0,0 +1,7 @@ +access_key = "" +app_id = "" +env_id = "" +prefix = "" +region = "" +res_id = "" +secret_key = "" \ No newline at end of file diff --git a/modules/iam-policy/s3-admin/README.md b/modules/iam-policy/s3-admin/README.md new file mode 100644 index 0000000..ecc86de --- /dev/null +++ b/modules/iam-policy/s3-admin/README.md @@ -0,0 +1,40 @@ + +## Requirements + +| Name | Version | +|------|---------| +| terraform | >= 1.3.0 | +| aws | ~> 5.0 | + +## Providers + +| Name | Version | +|------|---------| +| aws | ~> 5.0 | + +## Resources + +| Name | Type | +|------|------| +| [aws_iam_policy.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource | +| [aws_iam_policy_document.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| app\_id | n/a | `string` | n/a | yes | +| env\_id | n/a | `string` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| res\_id | n/a | `string` | n/a | yes | +| s3\_bucket\_arn | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| arn | n/a | + \ No newline at end of file diff --git a/modules/iam-policy/s3-admin/terraform.tfvars.example b/modules/iam-policy/s3-admin/terraform.tfvars.example new file mode 100644 index 0000000..78c933b --- /dev/null +++ b/modules/iam-policy/s3-admin/terraform.tfvars.example @@ -0,0 +1,8 @@ +access_key = "" +app_id = "" +env_id = "" +prefix = "" +region = "" +res_id = "" +s3_bucket_arn = "" +secret_key = "" \ No newline at end of file diff --git a/modules/iam-policy/sqs-admin/README.md b/modules/iam-policy/sqs-admin/README.md new file mode 100644 index 0000000..42a4f12 --- /dev/null +++ b/modules/iam-policy/sqs-admin/README.md @@ -0,0 +1,40 @@ + +## Requirements + +| Name | Version | +|------|---------| +| terraform | >= 1.3.0 | +| aws | ~> 5.0 | + +## Providers + +| Name | Version | +|------|---------| +| aws | ~> 5.0 | + +## Resources + +| Name | Type | +|------|------| +| [aws_iam_policy.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource | +| [aws_iam_policy_document.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| app\_id | n/a | `string` | n/a | yes | +| env\_id | n/a | `string` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| res\_id | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | +| sqs\_queue\_arn | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| arn | n/a | + \ No newline at end of file diff --git a/modules/iam-policy/sqs-admin/terraform.tfvars.example b/modules/iam-policy/sqs-admin/terraform.tfvars.example new file mode 100644 index 0000000..f43f826 --- /dev/null +++ b/modules/iam-policy/sqs-admin/terraform.tfvars.example @@ -0,0 +1,8 @@ +access_key = "" +app_id = "" +env_id = "" +prefix = "" +region = "" +res_id = "" +secret_key = "" +sqs_queue_arn = "" \ No newline at end of file diff --git a/modules/iam-role/service-account/README.md b/modules/iam-role/service-account/README.md new file mode 100644 index 0000000..cefd925 --- /dev/null +++ b/modules/iam-role/service-account/README.md @@ -0,0 +1,45 @@ + +## Requirements + +| Name | Version | +|------|---------| +| terraform | >= 1.3.0 | +| aws | ~> 5.0 | + +## Providers + +| Name | Version | +|------|---------| +| aws | ~> 5.0 | + +## Resources + +| Name | Type | +|------|------| +| [aws_iam_role.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | +| [aws_iam_role_policy_attachment.policies](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | +| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| app\_id | n/a | `string` | n/a | yes | +| env\_id | n/a | `string` | n/a | yes | +| namespace | n/a | `string` | n/a | yes | +| oidc\_provider | n/a | `string` | n/a | yes | +| oidc\_provider\_arn | n/a | `string` | n/a | yes | +| policy\_arns | n/a | `set(string)` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| res\_id | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| k8s\_service\_account\_name | n/a | +| role\_arn | n/a | + \ No newline at end of file diff --git a/modules/iam-role/service-account/terraform.tfvars.example b/modules/iam-role/service-account/terraform.tfvars.example new file mode 100644 index 0000000..cb56415 --- /dev/null +++ b/modules/iam-role/service-account/terraform.tfvars.example @@ -0,0 +1,11 @@ +access_key = "" +app_id = "" +env_id = "" +namespace = "" +oidc_provider = "" +oidc_provider_arn = "" +policy_arns = "" +prefix = "" +region = "" +res_id = "" +secret_key = "" \ No newline at end of file diff --git a/modules/s3/basic/README.md b/modules/s3/basic/README.md new file mode 100644 index 0000000..c260fd7 --- /dev/null +++ b/modules/s3/basic/README.md @@ -0,0 +1,43 @@ + +## Requirements + +| Name | Version | +|------|---------| +| terraform | >= 1.3.0 | +| aws | ~> 5.0 | + +## Providers + +| Name | Version | +|------|---------| +| aws | ~> 5.0 | + +## Resources + +| Name | Type | +|------|------| +| [aws_s3_bucket.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource | +| [aws_s3_bucket_server_side_encryption_configuration.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_server_side_encryption_configuration) | resource | +| [aws_s3_bucket_versioning.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_versioning) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| app\_id | n/a | `string` | n/a | yes | +| env\_id | n/a | `string` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| res\_id | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | +| force\_destroy | n/a | `bool` | `true` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| arn | n/a | +| bucket | n/a | +| region | n/a | + \ No newline at end of file diff --git a/modules/s3/basic/terraform.tfvars.example b/modules/s3/basic/terraform.tfvars.example new file mode 100644 index 0000000..b9b38f1 --- /dev/null +++ b/modules/s3/basic/terraform.tfvars.example @@ -0,0 +1,8 @@ +access_key = "" +app_id = "" +env_id = "" +force_destroy = true +prefix = "" +region = "" +res_id = "" +secret_key = "" \ No newline at end of file diff --git a/modules/sqs/basic/README.md b/modules/sqs/basic/README.md new file mode 100644 index 0000000..23a1f07 --- /dev/null +++ b/modules/sqs/basic/README.md @@ -0,0 +1,34 @@ + +## Requirements + +| Name | Version | +|------|---------| +| terraform | >= 1.3.0 | +| aws | ~> 5.0 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| sqs | terraform-aws-modules/sqs/aws | n/a | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| access\_key | n/a | `string` | n/a | yes | +| app\_id | n/a | `string` | n/a | yes | +| env\_id | n/a | `string` | n/a | yes | +| prefix | n/a | `string` | n/a | yes | +| region | n/a | `string` | n/a | yes | +| res\_id | n/a | `string` | n/a | yes | +| secret\_key | n/a | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| arn | n/a | +| region | n/a | +| url | n/a | + \ No newline at end of file diff --git a/modules/sqs/basic/terraform.tfvars.example b/modules/sqs/basic/terraform.tfvars.example new file mode 100644 index 0000000..6936f9f --- /dev/null +++ b/modules/sqs/basic/terraform.tfvars.example @@ -0,0 +1,7 @@ +access_key = "" +app_id = "" +env_id = "" +prefix = "" +region = "" +res_id = "" +secret_key = "" \ No newline at end of file