voronenko / devops-tf-eks Goto Github PK
View Code? Open in Web Editor NEWterraform baked AWS kubernetes cluster (EKS) - 1.18 compatible
terraform baked AWS kubernetes cluster (EKS) - 1.18 compatible
First off want to say stellar work man I really appreciate you putting all of this together!
It seems just about every K8 tutorial is around setting everything up from scratch in a new VPC. Ideally I'd like to spin up this TF plan inside my existing VPC so we can begin to migrate from docker swarm to this cluster. My plan was to basically skip the initial stage of the VPC config and then translate the rest of the config to match our existing IDs.
The TF variable file I've been handed down is very basic compared to this, I did read up on what workspaces are and we aren't using them to my knowledge. (Or maybe just using the default one, I've never changed workspaces.)
The two thing's I'm confused on are
${terraform.workspace}
is going to do, is it just going to use the existing workspace or is it defining a new one?${local.env}
doing? I've noticed it defined in a few places is that simply calling the locals
envs?I'm sure I can take all of that stuff out and dumb it down to match our stuff but if you don't mind explaining how those work I'd really appreciate it!
locals {
env = "${terraform.workspace}"
availabilityzone = "${var.AWS_REGION}a"
availabilityzone2 = "${var.AWS_REGION}b"
cluster_name= "${local.env}-cluster"
// NOTE: The usage of the specific kubernetes.io/cluster/*
// resource tags below are required for EKS and Kubernetes to discover
// and manage networking resources.
common_tags = "${map(
"Environment", "${local.env}",
"kubernetes.io/cluster/${local.cluster_name}", "shared"
)}"
}
name = "EKSClusterRole-${local.env}",
description = "Allows EKS to manage clusters on your behalf.",
assume_role_policy = <<POLICY
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Principal":{
"Service":"eks.amazonaws.com"
},
"Action":"sts:AssumeRole"
}
]
}
POLICY
}```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.