Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Velero workload identity #137

Merged
merged 5 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .identity/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# .identity

<!-- markdownlint-disable -->
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
Expand Down Expand Up @@ -55,4 +55,4 @@
| <a name="output_ci_service_principal_github_action_name"></a> [ci\_service\_principal\_github\_action\_name](#output\_ci\_service\_principal\_github\_action\_name) | n/a |
| <a name="output_subscription_id"></a> [subscription\_id](#output\_subscription\_id) | n/a |
| <a name="output_tenant_id"></a> [tenant\_id](#output\_tenant\_id) | n/a |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
20 changes: 12 additions & 8 deletions .utils/terraform_run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ ACTION="$1"

array=(
'.identity::dev'
'src/aks-platform::dev01'
'src/aks-platform::itn-dev'
'src/core::dev'
'src/coreplus::dev'
'src/domains/blueprint-app::dev'
'src/domains/blueprint-common::dev'
'src/domains/diego-app::dev'
'src/domains/diego-common::dev'
'src/domains/diego-app::itn-dev'
'src/domains/diego-common::itn-dev'
'src/domains/diego-container-apps::dev'
'src/domains/legacy-common::dev'
'src/domains/marco-common::dev'
'src/domains/umberto-common::dev'
'src/domains/test-app::itn-dev'
'src/domains/test-common::itn-dev'
'src/domains/test-common::itn-dev'
'src/domains/test-app::itn-dev'
'src/elk-monitoring::dev01'
'src/grafana-monitoring::dev01'
'src/packer::dev'
Expand All @@ -48,11 +52,11 @@ for index in "${array[@]}" ; do
echo "🔬 folder: $(pwd) in under terraform: $ACTION action"
sh terraform.sh "$ACTION" "$COMMAND" &

# terraform providers lock \
# -platform=windows_amd64 \
# -platform=darwin_amd64 \
# -platform=darwin_arm64 \
# -platform=linux_amd64
terraform providers lock \
-platform=windows_amd64 \
-platform=darwin_amd64 \
-platform=darwin_arm64 \
-platform=linux_amd64

pids+=($!)
popd
Expand Down
44 changes: 29 additions & 15 deletions src/aks-platform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/aks-platform/03_aks_middleware.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "azurerm_resource_group" "rg_velero" {

# Workload identity init
module "velero_workload_identity_init" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init?ref=velero-workload-identity"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init?ref=v8.46.0"

workload_identity_location = var.location
workload_identity_name_prefix = "velero"
Expand All @@ -22,7 +22,7 @@ resource "kubernetes_namespace" "velero_namespace" {

# Cluster Velero + Workload identity configuration
module "velero_aks_workload_identity" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_cluster_velero?ref=velero-workload-identity"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_cluster_velero?ref=v8.46.0"

prefix = var.prefix
location = var.location
Expand Down
4 changes: 2 additions & 2 deletions src/aks-platform/05_keda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ locals {
}

module "keda_workload_identity_init" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init?ref=v8.42.1"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init?ref=v8.45.0"

workload_identity_name_prefix = "keda"
workload_identity_resource_group_name = azurerm_resource_group.rg_aks.name
workload_identity_location = var.location
}

module "keda_workload_identity_configuration" {
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_configuration?ref=workload-identity-fix-config"
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_configuration?ref=v8.45.0"

workload_identity_name_prefix = "keda"
workload_identity_resource_group_name = azurerm_resource_group.rg_aks.name
Expand Down
12 changes: 6 additions & 6 deletions src/aks-platform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Launch the cluster creation
Re-enable all the resource, commented before to complete the procedure

<!-- markdownlint-disable -->
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
Expand All @@ -46,11 +46,11 @@ Re-enable all the resource, commented before to complete the procedure
| <a name="module_argocd_workload_identity_configuration"></a> [argocd\_workload\_identity\_configuration](#module\_argocd\_workload\_identity\_configuration) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_configuration | v8.42.1 |
| <a name="module_argocd_workload_identity_init"></a> [argocd\_workload\_identity\_init](#module\_argocd\_workload\_identity\_init) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init | v8.42.1 |
| <a name="module_cert_mounter_argocd_internal"></a> [cert\_mounter\_argocd\_internal](#module\_cert\_mounter\_argocd\_internal) | git::https://github.com/pagopa/terraform-azurerm-v3.git//cert_mounter | v8.42.1 |
| <a name="module_keda_workload_identity_configuration"></a> [keda\_workload\_identity\_configuration](#module\_keda\_workload\_identity\_configuration) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_configuration | workload-identity-fix-config |
| <a name="module_keda_workload_identity_init"></a> [keda\_workload\_identity\_init](#module\_keda\_workload\_identity\_init) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init | v8.42.1 |
| <a name="module_keda_workload_identity_configuration"></a> [keda\_workload\_identity\_configuration](#module\_keda\_workload\_identity\_configuration) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_configuration | v8.45.0 |
| <a name="module_keda_workload_identity_init"></a> [keda\_workload\_identity\_init](#module\_keda\_workload\_identity\_init) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init | v8.45.0 |
| <a name="module_nginx_ingress"></a> [nginx\_ingress](#module\_nginx\_ingress) | terraform-module/release/helm | 2.7.0 |
| <a name="module_velero_aks_workload_identity"></a> [velero\_aks\_workload\_identity](#module\_velero\_aks\_workload\_identity) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_cluster_velero | velero-workload-identity |
| <a name="module_velero_workload_identity_init"></a> [velero\_workload\_identity\_init](#module\_velero\_workload\_identity\_init) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init | velero-workload-identity |
| <a name="module_velero_aks_workload_identity"></a> [velero\_aks\_workload\_identity](#module\_velero\_aks\_workload\_identity) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_cluster_velero | v8.46.0 |
| <a name="module_velero_workload_identity_init"></a> [velero\_workload\_identity\_init](#module\_velero\_workload\_identity\_init) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_workload_identity_init | v8.46.0 |

## Resources

Expand Down Expand Up @@ -167,4 +167,4 @@ Re-enable all the resource, commented before to complete the procedure
## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
21 changes: 21 additions & 0 deletions src/core/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ az network dns zone show \


<!-- markdownlint-disable -->
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
Expand Down Expand Up @@ -189,4 +189,4 @@ az network dns zone show \
## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
4 changes: 2 additions & 2 deletions src/coreplus/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- markdownlint-disable -->
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
Expand Down Expand Up @@ -159,4 +159,4 @@
## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
<!-- END_TF_DOCS -->
Loading
Loading