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: add support for enableNodePublicIP #4581

Closed
iameli opened this issue Oct 9, 2019 · 5 comments
Closed

azurerm_kubernetes_cluster: add support for enableNodePublicIP #4581

iameli opened this issue Oct 9, 2019 · 5 comments

Comments

@iameli
Copy link

iameli commented Oct 9, 2019

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

Description

Azure has added support for an enableNodePublicIP field in the AgentPoolProfile schema. Would be nice to be able to make use of it from Terraform.

New or Affected Resource(s)

  • azurerm_kubernetes_cluster

Potential Terraform Configuration

resource "azurerm_kubernetes_cluster" "test" {
  name                = "test"
  location            = "UK South"
  resource_group_name = "testrg"
  dns_prefix          = "test"

  agent_pool_profile {
    name                  = "poola"
    count                 = 2
    vm_size               = "Standard_D8_v3"
    os_type               = "Linux"
    os_disk_size_gb       = 256
    type                  = "VirtualMachineScaleSets"
    enable_node_public_ip = true
  }

  agent_pool_profile {
    name                  = "poolb"
    count                 = 1
    vm_size               = "Standard_D8_v3"
    os_type               = "Linux"
    os_disk_size_gb       = 256
    type                  = "VirtualMachineScaleSets"
    enable_node_public_ip = false
  }
}

I'm going to need something like this within the next couple of months, so I'll implement it then unless someone else beats me to it.

@topikettunen
Copy link
Contributor

topikettunen commented Oct 14, 2019

I could tackle this!

Currently I've used following approach when working with public IPs and, for example, AKS ingress:

resource "azurerm_public_ip" "nginx_ingress" {
  name                = "nginx-ingress-pip"
  location            = azurerm_kubernetes_cluster.aks.location
  resource_group_name = azurerm_kubernetes_cluster.aks.node_resource_group
  allocation_method   = "Static"
  domain_name_label   = "cool-domain-k8s" 
}

and personally I believe that enabling public IP simply in agent pool profile would result to a slightly cleaner approach.

@jluk
Copy link

jluk commented Oct 15, 2019

FWIW this property is captured under issue #4001 which should exist as an agent pool profile property. Also for awareness this capability is still in preview so that's a good callout if it does get brought in.

@tombuildsstuff
Copy link
Contributor

hey @iameli

@topikettunen has added support for this in #4613 which has merged and will ship as a part of 1.37 - as such I'm going to close this issue for the moment. Taking a look through it appears the documentation for this field is missing, but I've got a fix for this locally which I'll push with a related PR later today.

Thanks!

@tombuildsstuff tombuildsstuff added this to the v1.37.0 milestone Nov 5, 2019
@ghost
Copy link

ghost commented Nov 26, 2019

This has been released in version 1.37.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 = "~> 1.37.0"
}
# ... other configuration ...

@ghost
Copy link

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

5 participants