Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Terraform module to get value in Kubernetes secrets store

License

Notifications You must be signed in to change notification settings

jobteaser/terraform-kubernetes-get-secret

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Module: Get Kubernetes Secret Value

This repository is a Terraform Module to use Kubernetes secrets as data.

Table of Contents

Requirements

This module requires Terraform version 0.10.x or newer and a valid out-of-cluster Kubernetes configuration at the default path ($HOME/.kube/config) or the path defined by $KUBECONFIG.

Usage

Add the module to your Terraform resources:

module "rds-postgres-password" {
  source = "github.com/jobteaser/terraform-kubernetes-get-secret?ref=v0.3.0"

  namespace = "default"
  name      = "terraform"
  key       = "database-password"
  context   = "k8s-context"
}

and load the module using terraform get.

Module Variables

Available variables are listed below, along with their default values:

variable description
namespace The kubernetes namespace
name The kubernetes secret name
key The kubernetes secret key to get
context The kubernetes context

Module outputs

Available outputs are listed below, along with their description:

output description
result A string of the secret value.

Contributing

Requirements

  • fully installed and configured go environment

Contributing code

To build binaries, use the following commands:

$ git clone git@github.com:gearnode/terraform-kubernetes-get-secret.git
$ cd terraform-kubernetes-get-secret
$ make

Maintainers

This module is a fork of gearnode/terraform-kubernetes-get-secret.

About

Terraform module to get value in Kubernetes secrets store

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 63.0%
  • HCL 15.6%
  • Shell 11.0%
  • Makefile 10.4%