Virtual Network



Azure Virtual Networks provide an isolated and secure environment to run your Azure resources, enabling you to securely connect Azure resources to each other, the internet, and on-premises networks.


Example yaml file:


apiVersion: azure.boundless.software/v1alpha1
kind: VirtualNetwork
metadata:
  name: vnet-sample
spec:
  provider:
    region: "eastus"
  resourceGroupName: "my-resource-group"
  addressSpace:
    - "10.0.0.0/16"
  subnets:
    - name: "subnet1"
      cidrBlock: "10.0.1.0/24"
      type: "private"
      zone: "1"
      routeTable:
        name: "rt-private"
        routes:
          - destination: "0.0.0.0/0"
        subnets:
          - "subnet1"
    - name: "subnet2"
      cidrBlock: "10.0.2.0/24"
      type: "public"
      natGateway:
        name: "nat1"
        zone: "1"
  networkSecurityGroup:
    - name: "nsg1"
      securityRules:
        - name: "allow-ssh"
          description: "Allow SSH access"
          destinationPortRange: "22"
          sourceAddressPrefix: "*"
          priority: 100
          access: "Allow"
          protocol: "Tcp"
          direction: "Inbound"
      subnets:
        - "subnet1"
  networkInterfaces:
    - name: "nic1"
      ipConfiguration:
        name: "ipconfig1"
        subnetId: "/subscriptions/.../subnets/subnet1"
  peers:
    - name: "peer1"
      remoteVirtualNetworkID: "/subscriptions/.../virtualNetworks/vnet2"
      allowForwardedTraffic: true
      allowGatewayTransit: false
      allowVirtualNetworkAccess: true
      remoteAllowForwardedTraffic: true
      remoteAllowGatewayTransit: false
      remoteAllowVirtualNetworkAccess: true
  tags:
    environment: "production"

Inputs


NameTypeDescription
addressSpace*[]stringAddressSpace is the address space for the VPC.
provider*AzureProviderSpecProvider is the Azure provider settings for this VPC.
resourceGroupName*stringResourceGroupName is the name of the resource group in which to create the VPC.
cidrBlockstringCidrBlock is the CIDR block for the VPC.
subnets[]SubnetSpecSubnets specifies the subnets to be created for this VPC.
networkSecurityGroups[]NetworkSecurityGroupSpecNetworkSecurityGroup specifies the Network Security Group settings for this VPC.
networkInterfaces[]NetworkInterfaceSpecNetworkInterfaces specifies the Network Interface settings for this VPC.
ddosProtectionPlanstringDdosProtectionPlan specifies the DDoS protection plan settings for this VPC.
peers[]PeerSpecVnetPeering specifies the VNet peering settings for this VPC.
tagsmap[string]stringTags are metadata to assign to the VPC.

Outputs


NameTypeDescription
conditionmetav1.ConditionThe condition of the Virtual Network.
namestringThe name of the Virtual Network.
idstringThe ID of the Virtual Network.
ddosProtectionPlanIdstringThe ID of the DDoS protection plan.
peersmap[string]*PeerStatusThe status of VNet peering connections.
subnetsmap[string]*SubnetStatusThe status of subnets within this VPC.
natGatewaysmap[string]*NatGatewayStatusThe status of NAT gateways within this VPC.
routeTablesmap[string]*RouteTableStatusThe status of route tables within this VPC.
networkSecurityGroupsmap[string]*NetworkSecurityGroupStatusThe status of network security groups within this VPC.
networkInterfacesmap[string]*NetworkInterfaceStatusThe status of network interfaces within this VPC.

IpConfigurationSpec


NameTypeDescription
name*stringName is the name of the IP configuration.
subnetId*stringSubnet is the subnet for the IP configuration.
privateIPAddressVersionstringPrivateIPAddressVersion is the IP address version for the IP configuration.
privateIPAllocationMethodstringPrivateIPAllocationMethod is the IP allocation method for the IP configuration.

SecurityRuleSpec


NameTypeDescription
name*stringName is the name of the security rule.
descriptionstringDescription is the description of the security rule.
destinationAddressPrefixstringDestinationAddressPrefix is the CIDR block of the destination.
destinationPortRangestringDestinationPortRange is the port range of the destination.
sourceAddressPrefixstringSourceAddressPrefix is the CIDR block of the source.
sourcePortRangestringSourcePortRange is the port range of the source.
priorityint32Priority is the priority of the security rule.
accessstringAccess is the access type of the security rule.
protocolstringProtocol is the protocol of the security rule.
direction*stringDirection is the direction of the security rule.

RouteSpec


NameTypeDescription
destination*stringDestination specifies the CIDR block of the route.

RouteTableSpec


NameTypeDescription
name*stringName is the name of the Route Table.
routes[]RouteSpecRoutes specifies the routes to be added to this Route Table.
subnets[]stringSubnets specifies the subnets associated with this Route Table.
tagsmap[string]stringTags are metadata to assign to the Route Table.

ZoneSpec


NameTypeDescription
zone*stringZone is the availability zone for the NAT Gateway.
subnets*[]stringSubnet is the subnet for the NAT Gateway.

RouteStatus


NameTypeDescription
conditionmetav1.ConditionCondition provides the current condition of this Route.
destinationstringDestination is the CIDR block of the route.

RouteTableStatus


NameTypeDescription
conditionmetav1.ConditionCondition provides the current condition of this Route Table.
namestringName is the name of the Route Table.
typestringType specifies the type of the Route Table.
idstringId is the Azure Route Table ID.
associationsmap[string]stringAssociations specifies the associated subnets.
routesmap[string]*RouteStatusRoutes specifies the status of routes within this Route Table.