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

Adding "azure_policy" to an existing cluster, Enables v1 of the Policy Add-on #6994

Closed
CharlKlein opened this issue May 19, 2020 · 3 comments · Fixed by #7233
Closed

Adding "azure_policy" to an existing cluster, Enables v1 of the Policy Add-on #6994

CharlKlein opened this issue May 19, 2020 · 3 comments · Fixed by #7233

Comments

@CharlKlein
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Summary

Adding "azure_policy" to an existing cluster, Enables an old version of the add-on, but does not allow for the selection of the version.

ps, Not sure if this is an Issue / Feature request.

Terraform (and AzureRM Provider) Version

Terraform v0.12.24

  • provider.azurerm v2.9.0

Affected Resource(s)

  • azurerm_kubernetes_cluster

Terraform Configuration Files

resource "azurerm_kubernetes_cluster" "dev" {
  ## Omitted for brevity  
   
 addon_profile {
    kube_dashboard {
      enabled = false
    }

    azure_policy {
      enabled = true
    }

  }
}

Debug Output

2020-05-18T16:59:55.8028186Z azurerm_kubernetes_cluster.omitted: Modifications complete after 6m34s [Omitted]
2020-05-18T16:59:57.3479111Z
2020-05-18T16:59:57.3479723Z Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Expected Behavior

Terraform updates the cluster adding the Azure policy, using the Latest available version of azure policy.

Actual Behavior

Terraform added the v1 of azure policy to the Cluster.

Message in Azure Portal:

The current cluster uses policy add-on V1. Please migrate to V2 by disabling the add-on, and re-enabling it. 
Azure Policy will not support V1 after spring 2020. V2 is a breaking change, so please read carefully on the instruction and impact at: https://aka.ms/akspolicydoc 

Steps to Reproduce

  1. terraform apply
@tombuildsstuff
Copy link
Contributor

Upstream issue: Azure/AKS#1606

@ghost
Copy link

ghost commented Jun 11, 2020

This has been released in version 2.14.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.14.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jul 11, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants