File tree Expand file tree Collapse file tree 8 files changed +16
-10
lines changed Expand file tree Collapse file tree 8 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ module "eks" {
30
30
resource "null_resource" "kubectl" {
31
31
depends_on = [module . eks ]
32
32
provisioner "local-exec" {
33
- command = " aws --region us-east-1 eks update-kubeconfig --name ${ module . eks . cluster_name } "
33
+ command = " aws eks update-kubeconfig --name ${ module . eks . cluster_name } "
34
34
}
35
35
}
36
36
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ resource "aws_instance" "nbc_instance" {
27
27
}
28
28
29
29
output "nbc_ssm_command" {
30
- value = " aws --region us-east-1 ssm start-session --target ${ aws_instance . nbc_instance . id } "
30
+ value = " aws ssm start-session --target ${ aws_instance . nbc_instance . id } "
31
31
}
32
32
33
33
output "nbc_url" {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ resource "aws_instance" "nbe_instance" {
53
53
}
54
54
55
55
output "nbe_ssm_command" {
56
- value = " aws --region us-east-1 ssm start-session --target ${ aws_instance . nbe_instance . id } "
56
+ value = " aws ssm start-session --target ${ aws_instance . nbe_instance . id } "
57
57
}
58
58
59
59
output "nbe_console_url" {
Original file line number Diff line number Diff line change @@ -24,5 +24,5 @@ resource "aws_instance" "orb_instance" {
24
24
}
25
25
26
26
output "orb_ssm_command" {
27
- value = " aws --region us-east-1 ssm start-session --target ${ aws_instance . orb_instance . id } "
27
+ value = " aws ssm start-session --target ${ aws_instance . orb_instance . id } "
28
28
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ data "external" "whoami" {
12
12
}
13
13
14
14
provider "aws" {
15
- region = " us-east-1 "
15
+ region = var . aws_region
16
16
default_tags {
17
17
tags = {
18
18
Owner = data.external.whoami.result.username
Original file line number Diff line number Diff line change 1
- nbe_token = ""
2
- nbe_console_password = "6chars"
3
- nbe_admin_password = "12characters"
4
- postgres_password = "yesql123"
1
+ aws_region = "us-east-1"
2
+ nbe_token = "your-nbe-token"
3
+ nbe_console_password = "your-console-password"
4
+ nbe_admin_password = "your-admin-password"
5
+ postgres_password = "your-postgres-password"
Original file line number Diff line number Diff line change
1
+ variable "aws_region" {
2
+ type = string
3
+ default = " us-east-1"
4
+ }
5
+
1
6
variable "nbe_token" {
2
7
type = string
3
8
sensitive = true
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ module "vpc" {
2
2
source = " terraform-aws-modules/vpc/aws"
3
3
name = " terraform-vpc"
4
4
cidr = " 10.0.0.0/16"
5
- azs = [" us-east-1a " , " us-east-1b " , " us-east-1c " ]
5
+ azs = [" ${ var . aws_region } a " , " ${ var . aws_region } b " , " ${ var . aws_region } c " ]
6
6
public_subnets = [" 10.0.1.0/24" , " 10.0.2.0/24" , " 10.0.3.0/24" ]
7
7
private_subnets = [" 10.0.11.0/24" , " 10.0.12.0/24" , " 10.0.13.0/24" ]
8
8
enable_nat_gateway = true
You can’t perform that action at this time.
0 commit comments