Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to demo-terraform-eks-cluster: eks version and profile support. #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 43 additions & 43 deletions demo-terraform-eks-cluster/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions demo-terraform-eks-cluster/aws.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
variable aws_profile {
type = string
description = "The name of the profile to configure for the AWS CLI to provision infrastructure"
default = "default"
}

variable aws_region {
type = string
description = "The name of the designated region to deploy the infrastructure"
default = "us-east-1"
}


provider "aws" {
profile = var.aws_profile
region = var.aws_region
}
7 changes: 7 additions & 0 deletions demo-terraform-eks-cluster/eks-cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ module "eks" {
source = "terraform-aws-modules/eks/aws"
cluster_name = local.cluster_name
cluster_version = "1.20"

# this ensures that we can still use the properties
# `subnets`, `worker_groups_defaults` and `worker_groups`
# that since version 18.0.0 are no longer supported.
#
version = "17.24.0"

subnets = module.vpc.private_subnets

tags = {
Expand Down
7 changes: 6 additions & 1 deletion demo-terraform-eks-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ output "config_map_aws_auth" {

output "region" {
description = "AWS region"
value = var.region
value = var.aws_region
}

output "profile" {
description = "AWS CLI profile"
value = var.aws_profile
}

output "cluster_name" {
Expand Down
8 changes: 0 additions & 8 deletions demo-terraform-eks-cluster/vpc.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
variable "region" {
default = "us-east-1"
description = "AWS region"
}

provider "aws" {
region = "us-east-1"
}

data "aws_availability_zones" "available" {}

Expand Down