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

Updating values forces create new resources #85

Closed
sshah90 opened this issue Jan 6, 2021 · 4 comments
Closed

Updating values forces create new resources #85

sshah90 opened this issue Jan 6, 2021 · 4 comments

Comments

@sshah90
Copy link

sshah90 commented Jan 6, 2021

Hello, This is a very easy module to work with but after deploying AKS cluster but when I try to apply some changes/updates it creates a new cluster.

After debugging I figure out that there are some values that are by default set up as "null" which causing this re-creation.

Check Below screenshots from my plan

Screen Shot 2021-01-06 at 1 01 43 PM

As you can see node_taints (this var needs to be added in the module), agents_availability_zones should be [] but as its default value is null so if a user doesn't provide it so resource recreate aks.

If we don't set auto_scaling for the default node pool then max and min pod should be 0 not null and the same goes with network_policy as well.

Please update/add the following variable's default values.

  • network_policy = "azure"
  • agents_availability_zones = []
  • agents_max_count = 0 (also change 0 here)
  • agents_min_count = 0
  • node_taints= [] (add new var in default_node_pool block)
@yupwei68
Copy link
Contributor

Hi @sshah90 , thanks for opening this issue. Would you provide your Azurerm version, terraform version, your hcl script and reproducing steps to help to reproduce this problem? Sorry that I can not reproduce this problem now.

@yupwei68
Copy link
Contributor

Hi @sshah90 ,sorry that I could not reproduce your error.
I tested with the script below, and I terraform apply, and then terraform plan. It shows no changes.

module "aks" {
  source                         = "Azure/aks/azurerm"
  prefix                         = "prefix"
  resource_group_name            = azurerm_resource_group.test.name
  enable_log_analytics_workspace = false
  enable_kube_dashboard          = false
  net_profile_pod_cidr           = "10.1.0.0/16"
  depends_on                     = [azurerm_resource_group.test]
}

@sshah90
Copy link
Author

sshah90 commented May 21, 2021

Hi @yupwei68, sorry for the late reply.

I have my code somewhere but not able to find it at this moment.

I will try to reproduce this issue over the weekend and let u know.

@lonegunmanb
Copy link
Member

I'm closing this issue due to no further response. Please feel free to reopen this issue if you can reproduce this issue with the latest version, thanks for your understanding @sshah90 .

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

No branches or pull requests

3 participants