Cloud Posse

Terraform Module to Manage IAM for Kops External DNS

Terraform module to provision an IAM role for external-dns running in a Kops cluster, and attach an IAM policy to the role with permissions to modify Route53 recordsets.

Terraform Module

terraform-aws-kops-external-dns

Release

0.1.0

Build Status

Build Status

Overview

This module assumes you are running external-dns in a Kops cluster.

It will provision an IAM role with the required permissions and grant the k8s masters the permission to assume it.

This is useful to make Kubernetes services discoverable via AWS DNS services.

The module uses terraform-aws-kops-metadata to lookup resources within a Kops cluster for easier integration with Terraform.

Usage

module "kops_external_dns" {
  source       = "git::https://github.com/cloudposse/terraform-aws-kops-external-dns.git?ref=master"
  namespace    = "cp"
  stage        = "prod"
  name         = "domain.com"
  masters_name = "masters"

  tags = {
    Cluster = "k8s.domain.com"
  }
}

Variables

Name Default Description Required
namespace `` Namespace (e.g. cp or cloudposse) Yes
stage `` Stage (e.g. prod, dev, staging) Yes
name `` Name of the Kops DNS zone (e.g. domain.com) Yes
attributes [] Additional attributes (e.g. policy or role) No
tags {} Additional tags (e.g. map("Cluster","k8s.domain.com") No
delimiter - Delimiter to be used between namespace, stage, name, and attributes No
masters_name masters k8s masters subdomain name in the Kops DNS zone No

Outputs

Name Description
role_name IAM role name
role_unique_id IAM role unique ID
role_arn IAM role ARN
policy_name IAM policy name
policy_id IAM policy ID
policy_arn IAM policy ARN