com.pulumi.azure.containerservice.outputs.KubernetesClusterNetworkProfile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.containerservice.outputs;
import com.pulumi.azure.containerservice.outputs.KubernetesClusterNetworkProfileLoadBalancerProfile;
import com.pulumi.azure.containerservice.outputs.KubernetesClusterNetworkProfileNatGatewayProfile;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class KubernetesClusterNetworkProfile {
/**
* @return IP address within the Kubernetes service address range that will be used by cluster service discovery (kube-dns). Changing this forces a new resource to be created.
*
*/
private @Nullable String dnsServiceIp;
/**
* @return Specifies a list of IP versions the Kubernetes Cluster will use to assign IP addresses to its nodes and pods. Possible values are `IPv4` and/or `IPv6`. `IPv4` must always be specified. Changing this forces a new resource to be created.
*
* ->**Note:** To configure dual-stack networking `ip_versions` should be set to `["IPv4", "IPv6"]`.
*
* ->**Note:** Dual-stack networking requires that the Preview Feature `Microsoft.ContainerService/AKS-EnableDualStack` is enabled and the Resource Provider is re-registered, see [the documentation](https://docs.microsoft.com/azure/aks/configure-kubenet-dual-stack?tabs=azure-cli%2Ckubectl#register-the-aks-enabledualstack-preview-feature) for more information.
*
*/
private @Nullable List ipVersions;
/**
* @return A `load_balancer_profile` block as defined below. This can only be specified when `load_balancer_sku` is set to `standard`. Changing this forces a new resource to be created.
*
*/
private @Nullable KubernetesClusterNetworkProfileLoadBalancerProfile loadBalancerProfile;
/**
* @return Specifies the SKU of the Load Balancer used for this Kubernetes Cluster. Possible values are `basic` and `standard`. Defaults to `standard`. Changing this forces a new resource to be created.
*
*/
private @Nullable String loadBalancerSku;
/**
* @return A `nat_gateway_profile` block as defined below. This can only be specified when `load_balancer_sku` is set to `standard` and `outbound_type` is set to `managedNATGateway` or `userAssignedNATGateway`. Changing this forces a new resource to be created.
*
*/
private @Nullable KubernetesClusterNetworkProfileNatGatewayProfile natGatewayProfile;
/**
* @return Specifies the data plane used for building the Kubernetes network. Possible values are `azure` and `cilium`. Defaults to `azure`. Disabling this forces a new resource to be created.
*
* > **Note:** When `network_data_plane` is set to `cilium`, the `network_plugin` field can only be set to `azure`.
*
* > **Note:** When `network_data_plane` is set to `cilium`, one of either `network_plugin_mode = "overlay"` or `pod_subnet_id` must be specified.
*
*/
private @Nullable String networkDataPlane;
/**
* @return Network mode to be used with Azure CNI. Possible values are `bridge` and `transparent`. Changing this forces a new resource to be created.
*
* > **Note:** `network_mode` can only be set to `bridge` for existing Kubernetes Clusters and cannot be used to provision new Clusters - this will be removed by Azure in the future.
*
* > **Note:** This property can only be set when `network_plugin` is set to `azure`.
*
*/
private @Nullable String networkMode;
/**
* @return Network plugin to use for networking. Currently supported values are `azure`, `kubenet` and `none`. Changing this forces a new resource to be created.
*
* > **Note:** When `network_plugin` is set to `azure` - the `pod_cidr` field must not be set, unless specifying `network_plugin_mode` to `overlay`.
*
*/
private String networkPlugin;
/**
* @return Specifies the network plugin mode used for building the Kubernetes network. Possible value is `overlay`.
*
* > **Note:** When `network_plugin_mode` is set to `overlay`, the `network_plugin` field can only be set to `azure`. When upgrading from Azure CNI without overlay, `pod_subnet_id` must be specified.
*
*/
private @Nullable String networkPluginMode;
/**
* @return Sets up network policy to be used with Azure CNI. [Network policy allows us to control the traffic flow between pods](https://docs.microsoft.com/azure/aks/use-network-policies). Currently supported values are `calico`, `azure` and `cilium`.
*
* > **Note:** When `network_policy` is set to `azure`, the `network_plugin` field can only be set to `azure`.
*
* > **Note:** When `network_policy` is set to `cilium`, the `network_data_plane` field must be set to `cilium`.
*
*/
private @Nullable String networkPolicy;
/**
* @return The outbound (egress) routing method which should be used for this Kubernetes Cluster. Possible values are `loadBalancer`, `userDefinedRouting`, `managedNATGateway` and `userAssignedNATGateway`. Defaults to `loadBalancer`. More information on supported migration paths for `outbound_type` can be found in [this documentation](https://learn.microsoft.com/azure/aks/egress-outboundtype#updating-outboundtype-after-cluster-creation).
*
*/
private @Nullable String outboundType;
/**
* @return The CIDR to use for pod IP addresses. This field can only be set when `network_plugin` is set to `kubenet` or `network_plugin_mode` is set to `overlay`. Changing this forces a new resource to be created.
*
*/
private @Nullable String podCidr;
/**
* @return A list of CIDRs to use for pod IP addresses. For single-stack networking a single IPv4 CIDR is expected. For dual-stack networking an IPv4 and IPv6 CIDR are expected. Changing this forces a new resource to be created.
*
*/
private @Nullable List podCidrs;
/**
* @return The Network Range used by the Kubernetes service. Changing this forces a new resource to be created.
*
*/
private @Nullable String serviceCidr;
/**
* @return A list of CIDRs to use for Kubernetes services. For single-stack networking a single IPv4 CIDR is expected. For dual-stack networking an IPv4 and IPv6 CIDR are expected. Changing this forces a new resource to be created.
*
* > **Note:** This range should not be used by any network element on or connected to this VNet. Service address CIDR must be smaller than /12. `docker_bridge_cidr`, `dns_service_ip` and `service_cidr` should all be empty or all should be set.
*
*/
private @Nullable List serviceCidrs;
private KubernetesClusterNetworkProfile() {}
/**
* @return IP address within the Kubernetes service address range that will be used by cluster service discovery (kube-dns). Changing this forces a new resource to be created.
*
*/
public Optional dnsServiceIp() {
return Optional.ofNullable(this.dnsServiceIp);
}
/**
* @return Specifies a list of IP versions the Kubernetes Cluster will use to assign IP addresses to its nodes and pods. Possible values are `IPv4` and/or `IPv6`. `IPv4` must always be specified. Changing this forces a new resource to be created.
*
* ->**Note:** To configure dual-stack networking `ip_versions` should be set to `["IPv4", "IPv6"]`.
*
* ->**Note:** Dual-stack networking requires that the Preview Feature `Microsoft.ContainerService/AKS-EnableDualStack` is enabled and the Resource Provider is re-registered, see [the documentation](https://docs.microsoft.com/azure/aks/configure-kubenet-dual-stack?tabs=azure-cli%2Ckubectl#register-the-aks-enabledualstack-preview-feature) for more information.
*
*/
public List ipVersions() {
return this.ipVersions == null ? List.of() : this.ipVersions;
}
/**
* @return A `load_balancer_profile` block as defined below. This can only be specified when `load_balancer_sku` is set to `standard`. Changing this forces a new resource to be created.
*
*/
public Optional loadBalancerProfile() {
return Optional.ofNullable(this.loadBalancerProfile);
}
/**
* @return Specifies the SKU of the Load Balancer used for this Kubernetes Cluster. Possible values are `basic` and `standard`. Defaults to `standard`. Changing this forces a new resource to be created.
*
*/
public Optional loadBalancerSku() {
return Optional.ofNullable(this.loadBalancerSku);
}
/**
* @return A `nat_gateway_profile` block as defined below. This can only be specified when `load_balancer_sku` is set to `standard` and `outbound_type` is set to `managedNATGateway` or `userAssignedNATGateway`. Changing this forces a new resource to be created.
*
*/
public Optional natGatewayProfile() {
return Optional.ofNullable(this.natGatewayProfile);
}
/**
* @return Specifies the data plane used for building the Kubernetes network. Possible values are `azure` and `cilium`. Defaults to `azure`. Disabling this forces a new resource to be created.
*
* > **Note:** When `network_data_plane` is set to `cilium`, the `network_plugin` field can only be set to `azure`.
*
* > **Note:** When `network_data_plane` is set to `cilium`, one of either `network_plugin_mode = "overlay"` or `pod_subnet_id` must be specified.
*
*/
public Optional networkDataPlane() {
return Optional.ofNullable(this.networkDataPlane);
}
/**
* @return Network mode to be used with Azure CNI. Possible values are `bridge` and `transparent`. Changing this forces a new resource to be created.
*
* > **Note:** `network_mode` can only be set to `bridge` for existing Kubernetes Clusters and cannot be used to provision new Clusters - this will be removed by Azure in the future.
*
* > **Note:** This property can only be set when `network_plugin` is set to `azure`.
*
*/
public Optional networkMode() {
return Optional.ofNullable(this.networkMode);
}
/**
* @return Network plugin to use for networking. Currently supported values are `azure`, `kubenet` and `none`. Changing this forces a new resource to be created.
*
* > **Note:** When `network_plugin` is set to `azure` - the `pod_cidr` field must not be set, unless specifying `network_plugin_mode` to `overlay`.
*
*/
public String networkPlugin() {
return this.networkPlugin;
}
/**
* @return Specifies the network plugin mode used for building the Kubernetes network. Possible value is `overlay`.
*
* > **Note:** When `network_plugin_mode` is set to `overlay`, the `network_plugin` field can only be set to `azure`. When upgrading from Azure CNI without overlay, `pod_subnet_id` must be specified.
*
*/
public Optional networkPluginMode() {
return Optional.ofNullable(this.networkPluginMode);
}
/**
* @return Sets up network policy to be used with Azure CNI. [Network policy allows us to control the traffic flow between pods](https://docs.microsoft.com/azure/aks/use-network-policies). Currently supported values are `calico`, `azure` and `cilium`.
*
* > **Note:** When `network_policy` is set to `azure`, the `network_plugin` field can only be set to `azure`.
*
* > **Note:** When `network_policy` is set to `cilium`, the `network_data_plane` field must be set to `cilium`.
*
*/
public Optional networkPolicy() {
return Optional.ofNullable(this.networkPolicy);
}
/**
* @return The outbound (egress) routing method which should be used for this Kubernetes Cluster. Possible values are `loadBalancer`, `userDefinedRouting`, `managedNATGateway` and `userAssignedNATGateway`. Defaults to `loadBalancer`. More information on supported migration paths for `outbound_type` can be found in [this documentation](https://learn.microsoft.com/azure/aks/egress-outboundtype#updating-outboundtype-after-cluster-creation).
*
*/
public Optional outboundType() {
return Optional.ofNullable(this.outboundType);
}
/**
* @return The CIDR to use for pod IP addresses. This field can only be set when `network_plugin` is set to `kubenet` or `network_plugin_mode` is set to `overlay`. Changing this forces a new resource to be created.
*
*/
public Optional podCidr() {
return Optional.ofNullable(this.podCidr);
}
/**
* @return A list of CIDRs to use for pod IP addresses. For single-stack networking a single IPv4 CIDR is expected. For dual-stack networking an IPv4 and IPv6 CIDR are expected. Changing this forces a new resource to be created.
*
*/
public List podCidrs() {
return this.podCidrs == null ? List.of() : this.podCidrs;
}
/**
* @return The Network Range used by the Kubernetes service. Changing this forces a new resource to be created.
*
*/
public Optional serviceCidr() {
return Optional.ofNullable(this.serviceCidr);
}
/**
* @return A list of CIDRs to use for Kubernetes services. For single-stack networking a single IPv4 CIDR is expected. For dual-stack networking an IPv4 and IPv6 CIDR are expected. Changing this forces a new resource to be created.
*
* > **Note:** This range should not be used by any network element on or connected to this VNet. Service address CIDR must be smaller than /12. `docker_bridge_cidr`, `dns_service_ip` and `service_cidr` should all be empty or all should be set.
*
*/
public List serviceCidrs() {
return this.serviceCidrs == null ? List.of() : this.serviceCidrs;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(KubernetesClusterNetworkProfile defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String dnsServiceIp;
private @Nullable List ipVersions;
private @Nullable KubernetesClusterNetworkProfileLoadBalancerProfile loadBalancerProfile;
private @Nullable String loadBalancerSku;
private @Nullable KubernetesClusterNetworkProfileNatGatewayProfile natGatewayProfile;
private @Nullable String networkDataPlane;
private @Nullable String networkMode;
private String networkPlugin;
private @Nullable String networkPluginMode;
private @Nullable String networkPolicy;
private @Nullable String outboundType;
private @Nullable String podCidr;
private @Nullable List podCidrs;
private @Nullable String serviceCidr;
private @Nullable List serviceCidrs;
public Builder() {}
public Builder(KubernetesClusterNetworkProfile defaults) {
Objects.requireNonNull(defaults);
this.dnsServiceIp = defaults.dnsServiceIp;
this.ipVersions = defaults.ipVersions;
this.loadBalancerProfile = defaults.loadBalancerProfile;
this.loadBalancerSku = defaults.loadBalancerSku;
this.natGatewayProfile = defaults.natGatewayProfile;
this.networkDataPlane = defaults.networkDataPlane;
this.networkMode = defaults.networkMode;
this.networkPlugin = defaults.networkPlugin;
this.networkPluginMode = defaults.networkPluginMode;
this.networkPolicy = defaults.networkPolicy;
this.outboundType = defaults.outboundType;
this.podCidr = defaults.podCidr;
this.podCidrs = defaults.podCidrs;
this.serviceCidr = defaults.serviceCidr;
this.serviceCidrs = defaults.serviceCidrs;
}
@CustomType.Setter
public Builder dnsServiceIp(@Nullable String dnsServiceIp) {
this.dnsServiceIp = dnsServiceIp;
return this;
}
@CustomType.Setter
public Builder ipVersions(@Nullable List ipVersions) {
this.ipVersions = ipVersions;
return this;
}
public Builder ipVersions(String... ipVersions) {
return ipVersions(List.of(ipVersions));
}
@CustomType.Setter
public Builder loadBalancerProfile(@Nullable KubernetesClusterNetworkProfileLoadBalancerProfile loadBalancerProfile) {
this.loadBalancerProfile = loadBalancerProfile;
return this;
}
@CustomType.Setter
public Builder loadBalancerSku(@Nullable String loadBalancerSku) {
this.loadBalancerSku = loadBalancerSku;
return this;
}
@CustomType.Setter
public Builder natGatewayProfile(@Nullable KubernetesClusterNetworkProfileNatGatewayProfile natGatewayProfile) {
this.natGatewayProfile = natGatewayProfile;
return this;
}
@CustomType.Setter
public Builder networkDataPlane(@Nullable String networkDataPlane) {
this.networkDataPlane = networkDataPlane;
return this;
}
@CustomType.Setter
public Builder networkMode(@Nullable String networkMode) {
this.networkMode = networkMode;
return this;
}
@CustomType.Setter
public Builder networkPlugin(String networkPlugin) {
if (networkPlugin == null) {
throw new MissingRequiredPropertyException("KubernetesClusterNetworkProfile", "networkPlugin");
}
this.networkPlugin = networkPlugin;
return this;
}
@CustomType.Setter
public Builder networkPluginMode(@Nullable String networkPluginMode) {
this.networkPluginMode = networkPluginMode;
return this;
}
@CustomType.Setter
public Builder networkPolicy(@Nullable String networkPolicy) {
this.networkPolicy = networkPolicy;
return this;
}
@CustomType.Setter
public Builder outboundType(@Nullable String outboundType) {
this.outboundType = outboundType;
return this;
}
@CustomType.Setter
public Builder podCidr(@Nullable String podCidr) {
this.podCidr = podCidr;
return this;
}
@CustomType.Setter
public Builder podCidrs(@Nullable List podCidrs) {
this.podCidrs = podCidrs;
return this;
}
public Builder podCidrs(String... podCidrs) {
return podCidrs(List.of(podCidrs));
}
@CustomType.Setter
public Builder serviceCidr(@Nullable String serviceCidr) {
this.serviceCidr = serviceCidr;
return this;
}
@CustomType.Setter
public Builder serviceCidrs(@Nullable List serviceCidrs) {
this.serviceCidrs = serviceCidrs;
return this;
}
public Builder serviceCidrs(String... serviceCidrs) {
return serviceCidrs(List.of(serviceCidrs));
}
public KubernetesClusterNetworkProfile build() {
final var _resultValue = new KubernetesClusterNetworkProfile();
_resultValue.dnsServiceIp = dnsServiceIp;
_resultValue.ipVersions = ipVersions;
_resultValue.loadBalancerProfile = loadBalancerProfile;
_resultValue.loadBalancerSku = loadBalancerSku;
_resultValue.natGatewayProfile = natGatewayProfile;
_resultValue.networkDataPlane = networkDataPlane;
_resultValue.networkMode = networkMode;
_resultValue.networkPlugin = networkPlugin;
_resultValue.networkPluginMode = networkPluginMode;
_resultValue.networkPolicy = networkPolicy;
_resultValue.outboundType = outboundType;
_resultValue.podCidr = podCidr;
_resultValue.podCidrs = podCidrs;
_resultValue.serviceCidr = serviceCidr;
_resultValue.serviceCidrs = serviceCidrs;
return _resultValue;
}
}
}