Skip to content

KNFSD DNS Round Robin Module

This Terraform module configures Amazon Route 53 DNS to use DNS round-robin for a KNFSD proxy cluster. This offers an alternative to using the load balancer by deploying a Lambda function to create/delete or modify a secondary ENI (static IP) for each EC2 instance in the ASG of the KNFSD proxy cluster.

This module is not intended to be used directly, and is deployed by the main KNFSD proxy module only when TRAFFIC_MODE = "dns_round_robin".

Prerequisites

To use DNS round-robin the KNFSD proxy cluster must be configured with:

  • ENABLE_KNFSD_AUTOSCALING = false
  • TRAFFIC_MODE = "dns_round_robin"

Inputs

Variable Description Required Default
SUBNET The single subnet ID to use for deployment of the KNFSD solution. Example: "subnet-038e337f0ff4cd53f". True No default
PROXY_BASENAME Prefix used to name AWS resources. Every deployment in an AWS account MUST be given a unique basename to avoid conflicts (some of the resources created must have a globally unique name within an AWS account). True No default
DNS_NAME The fully qualified domain name (FQDN) to assign the KNFSD proxy cluster. Defaults to: knfsd.{PROXY_BASENAME}.aws.internal. [Note: the trailing period is required]. False ""
EXISTING_LAMBDA_ROLE_ARN ARN of a pre-existing IAM role to use for the static_ip Lambda function instead of creating one. When set, the module skips creating the Lambda IAM role and its policy. False ""

Outputs

Variable Description
dns_name The DNS name that was created for the KNFSD proxy cluster. *
lambda_static_ip_resources [internal] Resources for the Lambda static_ip function dependency. **

* dns_name is useful if you're creating other resources in the same Terraform configuration that depend on the DNS entry to create a dependency between the DNS entry and the other resources.

** lambda_static_ip_resources output is used to ensure that the Lambda static_ip function is destroyed after the ASG is deleted.