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

Added support for AWS profile #2

Merged
merged 1 commit into from
Jan 8, 2022
Merged
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: 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