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

Enable API Server VNET Integration #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zioproto
Copy link
Collaborator

@zioproto zioproto commented Mar 15, 2024

@nellyk
Copy link
Member

nellyk commented Aug 16, 2024

looks like it is failing because of this

│ "message": "Feature Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview is not enabled. Please see https://aka.ms/aks/previews for how to enable features.",

@kewalaka
Copy link

kewalaka commented Dec 4, 2024

This is possible, noting it is a preview service:

resource "azapi_update_resource" "aks_api_server_access_profile" {
  type = "Microsoft.ContainerService/managedClusters@2024-09-02-preview"
  body = {
    properties = {
      apiServerAccessProfile = {
        enableVnetIntegration = var.api_server_vnet_integration #true
      }
    }
  }
  resource_id = azurerm_kubernetes_cluster.this.id
}

& because it is in preview the variable needs decorating like this to align to AVM spec requirements (& confirmation from the PG, I believe) :

variable "api_server_vnet_integration" {
  type        = bool
  default     = false
  description = <<DESCRIPTION
  # https://azure.github.io/Azure-Verified-Modules/specs/shared/#id-sfr1---category-composition---preview-services
  THIS IS A VARIABLE USED FOR A PREVIEW SERVICE/FEATURE, MICROSOFT MAY NOT PROVIDE SUPPORT FOR THIS, PLEASE CHECK THE PRODUCT DOCS FOR CLARIFICATION

  Enable VNET integration for the AKS cluster

  This requires the following preview feature registered on the subscription:

  az feature register --namespace "Microsoft.ContainerService" --name "EnableAPIServerVnetIntegrationPreview"
DESCRIPTION
}

@zioproto
Copy link
Collaborator Author

zioproto commented Dec 4, 2024

@kewalaka the problem is that the subscription where our CI is running does not have preview features registered.

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

Successfully merging this pull request may close these issues.

enable API Server VNET integration
3 participants