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

azurerm_kubernetes_cluster.dns_prefix should be required #1306

Closed
NickMRamirez opened this issue May 27, 2018 · 3 comments · Fixed by #1333
Closed

azurerm_kubernetes_cluster.dns_prefix should be required #1306

NickMRamirez opened this issue May 27, 2018 · 3 comments · Fixed by #1333

Comments

@NickMRamirez
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

Terraform Version

Terraform v0.11.3

Affected Resource(s)

  • azurerm_kubernetes_cluster

Terraform Configuration Files

Note that I have not set the dns_prefix field on the azurerm_kubernetes_cluster resource.

resource "azurerm_kubernetes_cluster" "aks" {
  name                = "akscluster1"
  location            = "${azurerm_resource_group.aks.location}"
  resource_group_name = "${azurerm_resource_group.aks.name}"

  linux_profile {
    admin_username = "aksuser"

    ssh_key {
      key_data = "${file("../example_ssh_keypairs/ssh_public_cert.pem")}"
    }
  }

  agent_pool_profile {
    name            = "default"
    count           = 1
    vm_size         = "Standard_B2ms" # 2 Cores, 8 GB RAM $0.094/hour
    os_type         = "Linux"
    os_disk_size_gb = 30
  }

  service_principal {
    client_id     = "${var.service_principal_client_id}"
    client_secret = "${var.service_principal_client_secret}"
  }

  tags {
    Environment = "Dev"
  }
}

Panic Output

Error: Error applying plan:

1 error(s) occurred:

* azurerm_kubernetes_cluster.aks: 1 error(s) occurred:

* azurerm_kubernetes_cluster.aks: containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="" Message=""

Expected Behavior

The AKS resouces should have been created.

Actual Behavior

Get an undescript error:

Failure sending request: StatusCode=400 -- Original Error: Code="" Message=""

Steps to Reproduce

Leave off the dns_prefix field from the azurerm_kubernetes_cluster resource.

References

According to the Terraform documentation, the dns_prefix field is optional. However, creating an AKS cluster with the Azure Portal, it is a required field.

@NickMRamirez
Copy link
Author

NickMRamirez commented May 27, 2018

It looks like the dns_prefix field is marked as optional in terraform-provider-azurerm/azurerm/resource_arm_kubernetes_cluster.go, line 38.

@katbyte
Copy link
Collaborator

katbyte commented Jun 16, 2018

Hey @NickMRamirez,

This was included in the 1.7 released available as of this afternoon, I hope it resolves this issue for you!

@ghost
Copy link

ghost commented Mar 30, 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 Mar 30, 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.

3 participants