Skip to content

Azure container container group is not deployed into a virtual network

Description

A virtual network is a logical network in Azure that is isolated from other networks. When you deploy a container group into a virtual network, you can control the inbound and outbound network traffic to and from your container group using network security groups (NSGs) and service endpoints. This can help to improve the security of your container group and protect it from unauthorized access or attacks.

Fix - Buildtime

Terraform

  • Resource: azurerm_container_group
  • Argument: network_profile_id
resource "azurerm_container_group" "example" {
              ...

  +           network_profile_id = "network_profile_id"    
            }