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

AKS resource seems to require vnet_subnet_id #1166

Closed
rberlind opened this issue Apr 25, 2018 · 10 comments
Closed

AKS resource seems to require vnet_subnet_id #1166

rberlind opened this issue Apr 25, 2018 · 10 comments

Comments

@rberlind
Copy link

Terraform Version

Terraform v0.11.7

  • provider.azurerm v1.3.3
  • provider.tls v1.1.0
  • provider.vault v1.1.0

Affected Resource(s)

Please list the resources as a list, for example:

  • azurerm_kubernetes_cluster

Terraform Configuration Files

https://github.com/rberlind/tfe-k8s-cluster-aks

Debug Output

Error: Error applying plan:
1 error(s) occurred:

  • azurerm_kubernetes_cluster.k8sexample: 1 error(s) occurred:
  • azurerm_kubernetes_cluster.k8sexample: containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="LinkedInvalidPropertyId" Message="Property id '' at path 'properties.agentPoolProfiles[0].vnetSubnetID' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'."

Expected Behavior

Since https://www.terraform.io/docs/providers/azurerm/r/kubernetes_cluster.html#vnet_subnet_id says that vnet_subnet_id is optional, the AKS cluster should have created a vnet and subnet or used the default for my resource group.

Actual Behavior

I got error above

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform init
  2. terraform apply
@mikestoltz
Copy link

I am also seeing this issue - when running a configuration file that had previously worked. Since I only pin azurerm to the minor version 1.3, I thought it may have been introduced with the release of version 1.3.3 - however pinning azurerm to version 1.3.2 did not solve the issue.

@rberlind
Copy link
Author

I wonder if it depends on kubernetes_version? I specified 1.7.12. I suspect something is more likely to have changed on the Azure/AKS side than in the Azure Provider itself

@rberlind
Copy link
Author

curious how long it takes for an AKS cluster to be created. I added creation of vnet and subnet and then specified the vnet_subnet_id. I see lots of stuff created, but Terraform finally terminated with:

1 error(s) occurred:

  • azurerm_kubernetes_cluster.k8sexample: 1 error(s) occurred:
  • azurerm_kubernetes_cluster.k8sexample: Long running operation terminated with status 'Failed': Code="ControlPlaneProvisioningInternalError" Message="Internal server error"

@rberlind
Copy link
Author

Running apply a second time after that error worked and gave me outputs.

@mikestoltz
Copy link

I don't think its related to the k8s version. I didnt change anything in my configuration from when it was working last week and now. I'm using 1.8.7 as the k8s version for what its worth.

@rberlind
Copy link
Author

thanks @mikestoltz . I sent an e-mail to one of the HashiCorp engineers who works on the Azure provider to let him know about this issue.

@tombuildsstuff
Copy link
Contributor

👋 hey all

A change got released earlier this week to the Azure API where the Subnet ID is now rejected if it's an empty string, rather than being absent from the request (which is why this is now failing). We added a fix for this issue late Tuesday in #1158 which has since been merged and will be released as a part of v1.4.0 today.

azurerm_kubernetes_cluster.k8sexample: Long running operation terminated with status 'Failed': Code="ControlPlaneProvisioningInternalError" Message="Internal server error"

@rberlind from my understanding, this is a capacity issue within the Azure region you're using - from my understanding AKS is still resource strained in particular regions; can you try reprovisioning into another region?

Given this issue's been fixes in #1158 and will be released shortly - I'm going to close this issue for the moment.

Thanks!

@tombuildsstuff
Copy link
Contributor

tombuildsstuff commented Apr 26, 2018

hey @rberlind @mikestoltz

Just to let you know that v1.4.0 of the Azure Provider has been released which includes a fix for this :)

Thanks!

@rberlind
Copy link
Author

Thanks @tombuildsstuff : My code did not include net_subnet_id at all in my original code (which has changed since I posted this). I had:

  agent_pool_profile {
    name       = "${var.agent_pool_name}"
    count      =  "${var.agent_count}"
    os_type    = "${var.os_type}"
    os_disk_size_gb = "${var.os_disk_size}"
    vm_size    = "${var.vm_size}"
  }

@ghost
Copy link

ghost commented Mar 31, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

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

No branches or pull requests

3 participants