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

chore: update terraform azurerm provider to version 4.x and migrate t… #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

r-vanooyen
Copy link

…erraform properties to match new version

Purpose

  • Migration / update of the used azurerm terraform provider to the newest version

Does this introduce a breaking change?

[ ] Yes
[x ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ x] Other... Please describe: **dependency updates**

How to Test

  • Get the code
  • execute terraform with set variables

Copy link
Author

@r-vanooyen r-vanooyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the diff displayed here in github and added 2 notes in it

@@ -1,150 +1,149 @@
terraform {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff seems not correct. The only real difference is this patch:

Index: terraform/modules/aks/main.tf
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/terraform/modules/aks/main.tf b/terraform/modules/aks/main.tf
--- a/terraform/modules/aks/main.tf	(revision 8bb51322e82bec3f9ab6457ac80633165e1afa3b)
+++ b/terraform/modules/aks/main.tf	(revision 293a44c4ece19d8a502aa813fe311573263d7486)
@@ -29,12 +29,13 @@
   kubernetes_version               = var.kubernetes_version
   dns_prefix                       = var.dns_prefix
   private_cluster_enabled          = var.private_cluster_enabled
-  automatic_channel_upgrade        = var.automatic_channel_upgrade
+  automatic_upgrade_channel        = var.automatic_channel_upgrade
   sku_tier                         = var.sku_tier
   workload_identity_enabled        = var.workload_identity_enabled
   oidc_issuer_enabled              = var.oidc_issuer_enabled
   open_service_mesh_enabled        = var.open_service_mesh_enabled
   image_cleaner_enabled            = var.image_cleaner_enabled
+  image_cleaner_interval_hours     = 168
   azure_policy_enabled             = var.azure_policy_enabled
   http_application_routing_enabled = var.http_application_routing_enabled
 
@@ -45,10 +46,9 @@
     pod_subnet_id           = var.pod_subnet_id
     zones                   = var.default_node_pool_availability_zones
     node_labels             = var.default_node_pool_node_labels
-    node_taints             = var.default_node_pool_node_taints
-    enable_auto_scaling     = var.default_node_pool_enable_auto_scaling
-    enable_host_encryption  = var.default_node_pool_enable_host_encryption
-    enable_node_public_ip   = var.default_node_pool_enable_node_public_ip
+    auto_scaling_enabled    = var.default_node_pool_enable_auto_scaling
+    host_encryption_enabled = var.default_node_pool_enable_host_encryption
+    node_public_ip_enabled  = var.default_node_pool_enable_node_public_ip
     max_pods                = var.default_node_pool_max_pods
     max_count               = var.default_node_pool_max_count
     min_count               = var.default_node_pool_min_count
@@ -92,7 +92,6 @@
   }
 
   azure_active_directory_role_based_access_control {
-    managed                    = true
     tenant_id                  = var.tenant_id
     admin_group_object_ids     = var.admin_group_object_ids
     azure_rbac_enabled         = var.azure_rbac_enabled

@@ -1,310 +1,305 @@
variable "name" {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this diff also does not seem to be correct. It is this diff:

Index: terraform/modules/aks/variables.tf
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/terraform/modules/aks/variables.tf b/terraform/modules/aks/variables.tf
--- a/terraform/modules/aks/variables.tf	(revision 8bb51322e82bec3f9ab6457ac80633165e1afa3b)
+++ b/terraform/modules/aks/variables.tf	(revision 293a44c4ece19d8a502aa813fe311573263d7486)
@@ -53,7 +53,7 @@
   type        = string
 
   validation {
-    condition = contains( ["patch", "rapid", "stable"], var.automatic_channel_upgrade)
+    condition = contains( ["patch", "rapid", "node-image", "stable"], var.automatic_channel_upgrade)
     error_message = "The upgrade mode is invalid."
   }
 }
@@ -164,11 +164,6 @@
   default       = {}
 } 
 
-variable "default_node_pool_node_taints" {
-  description = "(Optional) A map of Kubernetes labels which should be applied to nodes in this Node Pool. Changing this forces a new resource to be created."
-  type          = list(string)
-  default       = []
-} 
 
 variable "default_node_pool_os_disk_type" {
   description = "(Optional) The type of disk which should be used for the Operating System. Possible values are Ephemeral and Managed. Defaults to Managed. Changing this forces a new resource to be created."

@r-vanooyen
Copy link
Author

@microsoft-github-policy-service agree company="Valtech Mobility GmbH"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant