Inputs

The following input variables are supported:

external_traffic_policy

Description: The ExternalTrafficPolicy of the Service.

Type: string

Default: "Cluster"

extra_annotations

Description: Extra annotations to add to the Service.

Type: map(string)

Default: {}

extra_labels

Description: Extra labels to add to the Service.

Type: map(string)

Default: {}

headless_enabled

Description: Set to true iff setting up a StatefulSet headless service.

Type: bool

Default: false

internal_traffic_policy

Description: The InternalTrafficPolicy of the Service.

Type: string

Default: "Cluster"

load_balancer_class

Description: Iff type == LoadBalancer, the loadBalancerClass to use.

Type: string

Default: "service.k8s.aws/nlb"

match_labels

Description: The label selector to use for pods backing the Service

Type: map(string)

Default: n/a

name

Description: The name of this Service

Type: string

Default: n/a

namespace

Description: The namespace the Service will be created in.

Type: string

Default: n/a

ports

Description: The port configuration. Keys are the port names, and the values are the port configuration.

Type:

map(object({
pod_port = number # Port on the backing pods that traffic should be routed to
service_port = optional(number, null) # Port to expose on the service. defaults to pod_port
protocol = optional(string, "TCP") # One of TCP, UDP, or SCTP
}))

Default: {}

public_domain_names

Description: Iff type == LoadBalancer, the public domains names that this service will be accessible from.

Type: list(string)

Default: []

service_ip

Description: If provided, the service will be statically bound to this IP address. Must be within the Service IP CIDR range for the cluster.

Type: string

Default: null

type

Description: The type of the Service.

Type: string

Default: "ClusterIP"

Outputs

The following outputs are exported:

service_name

Description: n/a

Providers

The following providers are needed by this module: