Skip to content

Commit

Permalink
Initial example for terraform plan.
Browse files Browse the repository at this point in the history
  • Loading branch information
zawac002 committed Sep 27, 2023
1 parent 511a62a commit 38f53b9
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/simple/istio.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module "eks-configuration" {
source = "git@github.it.census.gov:SOA/tfmod-istio.git//"
#source = "git@github.it.census.gov:SOA/tfmod-istio.git//?ref=v1.0.0"

region = var.region
profile = var.profile

cluster_name = var.cluster_name
}
33 changes: 33 additions & 0 deletions examples/simple/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
terraform {
required_version = ">= 1.5.0"
}

provider "aws" {
profile = var.profile
region = var.region
}

data "aws_eks_cluster" "cluster" {
name = var.cluster_name
}

data "aws_eks_cluster_auth" "cluster" {
name = var.cluster_name
}

provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint

cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data)
token = data.aws_eks_cluster_auth.cluster.token
}

provider "helm" {
kubernetes {
host = data.aws_eks_cluster.cluster.endpoint

cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data)
token = data.aws_eks_cluster_auth.cluster.token
}
}

4 changes: 4 additions & 0 deletions examples/simple/simple.auto.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
region = "us-gov-east-1"
profile = "107742151971-do2-govcloud"
cluster_name = "adsd-cumulus-sandbox"

15 changes: 15 additions & 0 deletions examples/simple/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
variable "cluster_name" {
description = "EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev)"
type = string
}

variable "region" {
description = "AWS region"
type = string
}

variable "profile" {
description = "AWS config profile"
type = string
}

0 comments on commit 38f53b9

Please sign in to comment.