From fce1bd876c47db8d4bf12d97525013dd6c8bc96f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Feb 2023 04:25:42 +0000 Subject: [PATCH 1/8] build(deps): bump megalinter/megalinter from 6.18.0 to 6.19.0 (#40) Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.18.0 to 6.19.0. - [Release notes](https://github.com/megalinter/megalinter/releases) - [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md) - [Commits](https://github.com/megalinter/megalinter/compare/v6.18.0...v6.19.0) --- updated-dependencies: - dependency-name: megalinter/megalinter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/megalinter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/megalinter.yaml b/.github/workflows/megalinter.yaml index 5534b47..f8338d8 100644 --- a/.github/workflows/megalinter.yaml +++ b/.github/workflows/megalinter.yaml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - name: MegaLinter id: ml - uses: megalinter/megalinter/flavors/terraform@v6.18.0 + uses: megalinter/megalinter/flavors/terraform@v6.19.0 env: VALIDATE_ALL_CODEBASE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3dddaf4bcaec2a13902499af6c52a35b4468b886 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 05:14:24 +0000 Subject: [PATCH 2/8] build(deps): bump megalinter/megalinter from 6.19.0 to 6.20.0 (#41) Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.19.0 to 6.20.0. - [Release notes](https://github.com/megalinter/megalinter/releases) - [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md) - [Commits](https://github.com/megalinter/megalinter/compare/v6.19.0...v6.20.0) --- updated-dependencies: - dependency-name: megalinter/megalinter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/megalinter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/megalinter.yaml b/.github/workflows/megalinter.yaml index f8338d8..c282268 100644 --- a/.github/workflows/megalinter.yaml +++ b/.github/workflows/megalinter.yaml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - name: MegaLinter id: ml - uses: megalinter/megalinter/flavors/terraform@v6.19.0 + uses: megalinter/megalinter/flavors/terraform@v6.20.0 env: VALIDATE_ALL_CODEBASE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From be8eaa9caeec66da9cd9dc3a58a5a8dd21d9f4f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Mar 2023 05:04:57 +0000 Subject: [PATCH 3/8] build(deps): bump megalinter/megalinter from 6.20.0 to 6.20.1 (#42) Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.20.0 to 6.20.1. - [Release notes](https://github.com/megalinter/megalinter/releases) - [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md) - [Commits](https://github.com/megalinter/megalinter/compare/v6.20.0...v6.20.1) --- updated-dependencies: - dependency-name: megalinter/megalinter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/megalinter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/megalinter.yaml b/.github/workflows/megalinter.yaml index c282268..a14a13c 100644 --- a/.github/workflows/megalinter.yaml +++ b/.github/workflows/megalinter.yaml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - name: MegaLinter id: ml - uses: megalinter/megalinter/flavors/terraform@v6.20.0 + uses: megalinter/megalinter/flavors/terraform@v6.20.1 env: VALIDATE_ALL_CODEBASE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3d6a54f9f3736eb8057dba0b496500149717ee61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 05:22:33 +0000 Subject: [PATCH 4/8] build(deps): bump megalinter/megalinter from 6.20.1 to 6.21.0 (#43) Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.20.1 to 6.21.0. - [Release notes](https://github.com/megalinter/megalinter/releases) - [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md) - [Commits](https://github.com/megalinter/megalinter/compare/v6.20.1...v6.21.0) --- updated-dependencies: - dependency-name: megalinter/megalinter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/megalinter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/megalinter.yaml b/.github/workflows/megalinter.yaml index a14a13c..30a6eca 100644 --- a/.github/workflows/megalinter.yaml +++ b/.github/workflows/megalinter.yaml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - name: MegaLinter id: ml - uses: megalinter/megalinter/flavors/terraform@v6.20.1 + uses: megalinter/megalinter/flavors/terraform@v6.21.0 env: VALIDATE_ALL_CODEBASE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7b04968375507a48a20f8d7c223719852ea4d85b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 05:18:09 +0000 Subject: [PATCH 5/8] build(deps): bump megalinter/megalinter from 6.21.0 to 6.22.1 (#44) Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.21.0 to 6.22.1. - [Release notes](https://github.com/megalinter/megalinter/releases) - [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md) - [Commits](https://github.com/megalinter/megalinter/compare/v6.21.0...v6.22.1) --- updated-dependencies: - dependency-name: megalinter/megalinter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/megalinter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/megalinter.yaml b/.github/workflows/megalinter.yaml index 30a6eca..28759cf 100644 --- a/.github/workflows/megalinter.yaml +++ b/.github/workflows/megalinter.yaml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - name: MegaLinter id: ml - uses: megalinter/megalinter/flavors/terraform@v6.21.0 + uses: megalinter/megalinter/flavors/terraform@v6.22.1 env: VALIDATE_ALL_CODEBASE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ce790c1b6acb6c74e2773db204c0813f9e8f2364 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 05:09:25 +0000 Subject: [PATCH 6/8] build(deps): bump megalinter/megalinter from 6.22.1 to 6.22.2 (#45) Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.22.1 to 6.22.2. - [Release notes](https://github.com/megalinter/megalinter/releases) - [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md) - [Commits](https://github.com/megalinter/megalinter/compare/v6.22.1...v6.22.2) --- updated-dependencies: - dependency-name: megalinter/megalinter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/megalinter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/megalinter.yaml b/.github/workflows/megalinter.yaml index 28759cf..8fab804 100644 --- a/.github/workflows/megalinter.yaml +++ b/.github/workflows/megalinter.yaml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - name: MegaLinter id: ml - uses: megalinter/megalinter/flavors/terraform@v6.22.1 + uses: megalinter/megalinter/flavors/terraform@v6.22.2 env: VALIDATE_ALL_CODEBASE: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7b795c5273c617c65a918abc23bb91cae0fb92c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 05:02:12 +0000 Subject: [PATCH 7/8] build(deps): bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 (#46) Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.3.6 to 1.4.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.3.6...v1.4.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dependabot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml index f0d09ec..ab849a8 100644 --- a/.github/workflows/dependabot.yaml +++ b/.github/workflows/dependabot.yaml @@ -11,7 +11,7 @@ jobs: steps: - name: Dependabot metadata id: dependabot-metadata - uses: dependabot/fetch-metadata@v1.3.6 + uses: dependabot/fetch-metadata@v1.4.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} - name: Approve a PR From 61a227b12da54fa82d9e7c9a0c52d9f9b37d7b70 Mon Sep 17 00:00:00 2001 From: Benedikt Brauneck Date: Wed, 26 Apr 2023 11:54:10 +0200 Subject: [PATCH 8/8] fix: added optional hosts for ingress --- README.md | 1 + main.tf | 20 ++++++++++++++++++++ variables.tf | 6 ++++++ 3 files changed, 27 insertions(+) diff --git a/README.md b/README.md index 4f24178..64ea8ef 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [additional\_hosts](#input\_additional\_hosts) | Map of additional hosts to be added to the ingress. | `map(string)` | `{}` | no | | [context](#input\_context) | Default environmental context |
object({
organization = string
environment = string
account = string
product = string
tags = map(string)
})
| n/a | yes | | [environment\_variables](#input\_environment\_variables) | Map with environment variables injected to the containers. | `map(any)` | n/a | yes | | [hpa](#input\_hpa) | Object with autoscaler limits and requests. |
object({
max_replicas = number
min_replicas = number
target_cpu_utilization_percentage = number
})
| n/a | yes | diff --git a/main.tf b/main.tf index d6481e3..8d4fd0f 100755 --- a/main.tf +++ b/main.tf @@ -185,6 +185,26 @@ resource "kubernetes_ingress_v1" "this" { } } } + dynamic "rule" { + for_each = var.additional_hosts + content { + host = rule.key + http { + path { + path = rule.value + + backend { + service { + name = kubernetes_service.this[0].metadata[0].name + port { + number = var.service.target_port + } + } + } + } + } + } + } } lifecycle { ignore_changes = [ diff --git a/variables.tf b/variables.tf index 1fd8909..556badc 100755 --- a/variables.tf +++ b/variables.tf @@ -11,6 +11,12 @@ variable "paths" { description = "Object mapping local paths to container paths" default = {} } + +variable "additional_hosts" { + type = map(string) + description = "Map of additional hosts to be added to the ingress." + default = {} +} variable "namespace" { type = string description = "Kubernetes namespace where resources must be created."