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

The provider hashicorp/azurerm does not support resource type "azurerm_extended_location_custom_location" #28744

Open
1 task done
orgads opened this issue Feb 11, 2025 · 1 comment · May be fixed by #28066
Open
1 task done

Comments

@orgads
Copy link
Contributor

orgads commented Feb 11, 2025

Is there an existing issue for this?

  • I have searched the existing issues

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Terraform Version

1.10.5

AzureRM Provider Version

4.18.0

Affected Resource(s)/Data Source(s)

azurerm_extended_location_custom_location

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

data "azurerm_client_config" "current" {}

resource "azurerm_arc_kubernetes_cluster" "example" {
  name                         = "example-akcc"
  resource_group_name          = azurerm_resource_group.example.name
  location                     = "West Europe"
  agent_public_key_certificate = filebase64("testdata/public.cer")

  identity {
    type = "SystemAssigned"
  }

  tags = {
    ENV = "Test"
  }
}

resource "local_file" "example" {
  depends_on = [
    azurerm_kubernetes_cluster.example,
  ]
  content  = azurerm_kubernetes_cluster.example.kube_config_raw
  filename = "${path.module}/kubeconfig-example"
}

resource "null_resource" "example1" {
  depends_on = [
    azurerm_kubernetes_cluster.example,
  ]
  provisioner "local-exec" {
    command = "set KUBECONFIG=${path.module}/kubeconfig-example"
  }
}

resource "null_resource" "example2" {
  depends_on = [
    null_resource.example1,
  ]
  provisioner "local-exec" {
    command = "az connectedk8s connect --name example-akcc --resource-group ${azurerm_resource_group.example.name} --subscription ${data.azurerm_client_config.current.subscription_id} --location ${azurerm_resource_group.example.location} --kube-config=${path.module}/kubeconfig-example --kube-context example"
  }
}

resource "azurerm_arc_kubernetes_cluster_extension" "example" {
  name           = "example-ext"
  cluster_id     = azurerm_arc_kubernetes_cluster.example.id
  extension_type = "microsoft.flux"
}

resource "azurerm_extended_location_custom_location" "example" {
  name                = "example-custom-location"
  resource_group_name = azurerm_resource_group.example.name
  location            = "West Europe"
  cluster_extension_ids = [
    azurerm_arc_kubernetes_cluster_extension.example.id
  ]
  display_name     = "example-custom-location"
  namespace        = "example-namespace"
  host_resource_id = azurerm_arc_kubernetes_cluster.example.id
  authentication {
    value = base64encode(azurerm_kubernetes_cluster.example.kube_config_raw)
  }
}

Debug Output/Panic Output

│ Error: Invalid resource type
│
│   on azure-arc.tf line 102, in resource "azurerm_extended_location_custom_location" "app-service":
│  102: resource "azurerm_extended_location_custom_location" "app-service" {
│
│ The provider hashicorp/azurerm does not support resource type "azurerm_extended_location_custom_location".

Expected Behaviour

This should work as documented. The resource was added in version 3.116.

Actual Behaviour

No response

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

orgads added a commit to orgads/terraform-provider-azurerm that referenced this issue Feb 11, 2025
The resource name is already without the first "location", but the
documentation was wrong.

Fixes hashicorp#28744
@rcskosir rcskosir linked a pull request Feb 11, 2025 that will close this issue
14 tasks
@teowa teowa linked a pull request Feb 12, 2025 that will close this issue
14 tasks
@rcskosir rcskosir added the bug label Feb 19, 2025
@rcskosir
Copy link
Contributor

Thank you for taking the time to open this issue. Please subscribe to PR #28066 created by @teowa for additional updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment