mirror of https://github.com/fluxcd/flux2.git
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			36 lines
		
	
	
		
			865 B
		
	
	
	
		
			HCL
		
	
			
		
		
	
	
			36 lines
		
	
	
		
			865 B
		
	
	
	
		
			HCL
		
	
resource "azurerm_kubernetes_cluster" "this" {
 | 
						|
  name                = "aks-${local.name_suffix}"
 | 
						|
  location            = azurerm_resource_group.this.location
 | 
						|
  resource_group_name = azurerm_resource_group.this.name
 | 
						|
 | 
						|
  dns_prefix = "aks${local.name_suffix}"
 | 
						|
 | 
						|
  default_node_pool {
 | 
						|
    name            = "default"
 | 
						|
    node_count      = 2
 | 
						|
    vm_size         = "Standard_B2s"
 | 
						|
    os_disk_size_gb = 30
 | 
						|
  }
 | 
						|
 | 
						|
  identity {
 | 
						|
    type = "SystemAssigned"
 | 
						|
  }
 | 
						|
 | 
						|
  role_based_access_control_enabled = true
 | 
						|
 | 
						|
  network_profile {
 | 
						|
    network_plugin = "kubenet"
 | 
						|
    network_policy = "calico"
 | 
						|
  }
 | 
						|
 | 
						|
  tags = {
 | 
						|
    environment = "e2e"
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
resource "azurerm_role_assignment" "aks_acr_pull" {
 | 
						|
  scope                = data.azurerm_container_registry.shared.id
 | 
						|
  role_definition_name = "AcrPull"
 | 
						|
  principal_id         = azurerm_kubernetes_cluster.this.kubelet_identity[0].object_id
 | 
						|
}
 |