Skip to content

Commit

Permalink
modified to support the ability of specifying profiles for running in…
Browse files Browse the repository at this point in the history
…frastructure provisioning in AWS
  • Loading branch information
hyp0th3rmi4 committed Jan 8, 2022
1 parent 500ee1a commit 8dc5493
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 52 deletions.
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

0 comments on commit 8dc5493

Please sign in to comment.