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

Support for azurerm_arc_kubernetes_cluster Data Resource for existing clusters #22941

Open
1 task done
2good4hisowngood opened this issue Aug 14, 2023 · 1 comment
Open
1 task done

Comments

@2good4hisowngood
Copy link

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 "+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 and review the contribution guide to help.

Description

I would like to be able to call on an existing cluster, but azurerm_arc_kubernetes_cluster lacks a data method only the new resource method which while extensive appears to be largely for Azure based machines or publicly exposed clusters which is not in my homelab use-case. This way I can connect a couple of nodes as separate clusters from onprem and manage them for things like installing extensions.

New or Affected Resource(s)/Data Source(s)

azurerm_arc_kubernetes_cluster

Potential Terraform Configuration

I'd imagine it'd largely look like the Azure Arc Machine: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/arc_machine

data "azurerm_arc_machine" "example" {
  name                = "existing-hcmachine"
  resource_group_name = "existing-rg"
}

output "id" {
  value = data.azurerm_arc_machine.example.id
}

References

No response

@suvarnanith
Copy link

suvarnanith commented Aug 23, 2024

@stephybun @teowa I am trying to deploy a Azure ARC for Kubernetes. My Kubernetes cluster is in on prem and i want to create the Azure Arc for Kubernetes using terraform.

As per documentation i understand that az connectedk8s connect along with --name “asd” --resource-group “rgname” --location “westeurope” --correlation-id “XXX” --tags “Datacenter City StateOrDistrict CountryOrRegion” needs to be run in the Vm which there is current context is the Kubernetes cluster which we want to connect to Arc. This command will do the helm chart deployment to deploy the agent in Kubernetes cluster and connect to Azure.

But in the below link for terraform i don’t see the option of tags and connection. Its asking to pass public key. What does this mean?

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/arc_kubernetes_cluster

https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/arckubernetes

What does azurerm_arc_kubernetes_cluster actually do in terraform?

Any one know about his?

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

No branches or pull requests

4 participants