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 setup failing in Government Cloud #5960

Closed
jlogsdon opened this issue Mar 2, 2020 · 4 comments · Fixed by #6370
Closed

AKS setup failing in Government Cloud #5960

jlogsdon opened this issue Mar 2, 2020 · 4 comments · Fixed by #6370

Comments

@jlogsdon
Copy link

jlogsdon commented Mar 2, 2020

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 (and AzureRM Provider) Version

Affected Resource(s)

  • azurerm_kubernetes_cluster

Terraform Configuration Files

resource "azurerm_kubernetes_cluster" "k8s_cluster" {
  resource_group_name = "${local.resource_group_name}"
  location            = "${var.resource_group_location}"
  name                = "${var.cluster_name}"
  dns_prefix          = "${local.unique_resource_name}"
  kubernetes_version  = "${var.cluster_version}"

  default_node_pool {
    max_count           = "${var.cluster_pool_vm_max_count}"
    min_count           = "${var.cluster_pool_vm_min_count}"
    node_count          = "${var.cluster_pool_vm_count}"
    name                = "${var.cluster_pool_name}"
    vm_size             = "${var.cluster_pool_vm_size}"
    os_disk_size_gb     = "${var.cluster_pool_vm_disk}"
    enable_auto_scaling = "${var.cluster_pool_enable_auto_scaling}"
    type                = "${var.cluster_pool_enable_auto_scaling ? "VirtualMachineScaleSets" : "AvailabilitySet" }"
  }

  lifecycle {
    ignore_changes = [
      "default_node_pool.0.node_count"
    ]
  }

  role_based_access_control {
    enabled = true
  }

  # https://github.com/terraform-providers/terraform-provider-azurerm/issues/2510
  service_principal {
    client_id     = "${azurerm_azuread_application.aks_app.application_id}"
    client_secret = "${azurerm_azuread_service_principal_password.aks_sp_password.value}"
  }
}

Debug Output

Panic Output

Expected Behavior

It should create the AKS cluster as configured (without any addons).

Actual Behavior

The request to create the cluster failed with a 400 status.

azurerm_kubernetes_cluster.k8s_cluster: Error creating Managed Kubernetes Cluster "logrocket" (Resource Group "logrocketiew0s2"): containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="OperationNotAllowed" Message="Addon 'httpApplicationRouting' is not supported in this cloud environment.

Steps to Reproduce

  1. terraform apply

Important Factoids

This is a Government Cloud customer; we do not have access to our own Government Cloud account to test with.

References

  • #0000
@jlogsdon
Copy link
Author

jlogsdon commented Mar 2, 2020

Our assumption is that Azure's gov cloud sees the keys in the request, which are always included if I am reading the code correctly, and rejecting them outright.

@e96wic
Copy link

e96wic commented Apr 2, 2020

Same issue in China

@ghost
Copy link

ghost commented Apr 9, 2020

This has been released in version 2.5.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.5.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented May 7, 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 May 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.