Azure terraform deployment issue - unknown addon_profile

10/29/2018

i am trying to deploy kubernetes cluster with OMS monitoring enabled with below code snippet.

addon_profile {
  oms_agent {
    enabled                    = true
    log_analytics_workspace_id = "${var.omswsid}"
    }
}

network_profile {
  network_plugin = "azure"
}

when i am running terraform plan i am getting below errors.

Error: module.k8s.azurerm_kubernetes_cluster.k8s: : invalid or unknown key: addon_profile
Error: module.k8s.azurerm_kubernetes_cluster.k8s: : invalid or unknown key: network_profile

Let me know your inputs. thanks.

-- krishna bh
azure
azure-log-analytics
kubernetes
terraform

2 Answers

10/29/2018

You should update you terraform modules to the latest version, as the code snippets seem to be fine

-- 4c74356b41
Source: StackOverflow

10/29/2018

Removed version dependency from Provider file. Updated modules using below commands solved my issue.

terraform init -upgrade
terraform get -update
-- krishna bh
Source: StackOverflow