Skip to content

Commit bd31e7b

Browse files
committed
terraform/AWS: Rename the region Kconfig symbols
Be consistent with the other terraform providers -- add "REGION" to the names of Kconfig symbols that define specific regions. This also comports with the names of the other items that are configured under terraform/aws/. Signed-off-by: Chuck Lever <[email protected]>
1 parent 55b421f commit bd31e7b

File tree

1 file changed

+46
-37
lines changed

1 file changed

+46
-37
lines changed

terraform/aws/kconfigs/Kconfig.location

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
choice
2-
prompt "AWS region to use"
3-
default TERRAFORM_AWS_US_WEST_2
2+
prompt "AWS region"
3+
default TERRAFORM_AWS_REGION_US_WEST_2
44
help
5-
Use this option to select the AWS region that is
6-
geographically closest to you.
5+
Use this option to select the AWS region that hosts your
6+
compute and storage resources. If you do not explicitly
7+
specify a region, the US West (Oregon) region is the
8+
default.
79

8-
Once selected, you can stick with the default AV region,
10+
Once selected, you can stick with the default AV zone
911
chosen by kdevops, or use:
1012

1113
aws ec2 describe-availability-zones --region <region-name>
@@ -14,28 +16,8 @@ choice
1416
AWS account. Enter your selection from this list using the
1517
TERRAFORM_AWS_AV_REGION menu.
1618

17-
config TERRAFORM_AWS_US_EAST_1
18-
bool "us-east-1 - N. Virginia"
19-
help
20-
This option will set the AWS region to us-east-1.
21-
22-
config TERRAFORM_AWS_US_EAST_2
23-
bool "us-east-2 - Ohio"
24-
help
25-
This option will set the AWS region to us-east-2.
26-
27-
config TERRAFORM_AWS_US_WEST_1
28-
bool "us-west-1 - North California"
29-
help
30-
This option will set the AWS region to us-west-1.
31-
32-
config TERRAFORM_AWS_US_WEST_2
33-
bool "us-west-2 - Oregon"
34-
help
35-
This option will set the AWS region to us-west-2.
36-
37-
If you wish to expand on this list send a patch after reading
38-
this list:
19+
If you wish to expand on the region list, send a patch after
20+
reading this list:
3921

4022
https://docs.aws.amazon.com/general/latest/gr/rande.html
4123

@@ -68,17 +50,44 @@ config TERRAFORM_AWS_US_WEST_2
6850
aws ec2 describe-images --image-ids ami-0699f753302dd8b00 | grep OwnerId
6951
"OwnerId": "137112412989",
7052

53+
config TERRAFORM_AWS_REGION_US_EAST_1
54+
bool "us-east-1 - N. Virginia"
55+
help
56+
This option specifies the United States east-1 region.
57+
Multiple data centers are located in the US state of
58+
Virginia.
59+
60+
config TERRAFORM_AWS_REGION_US_EAST_2
61+
bool "us-east-2 - Ohio"
62+
help
63+
This option specifies the United States east-2 region.
64+
The data center is located in Columbus, Ohio, US.
65+
66+
config TERRAFORM_AWS_REGION_US_WEST_1
67+
bool "us-west-1 - North California"
68+
help
69+
This option specifies the United States west-1 region.
70+
The data center is located in San Francisco, California,
71+
US.
72+
73+
config TERRAFORM_AWS_REGION_US_WEST_2
74+
bool "us-west-2 - Oregon"
75+
help
76+
This option specifies the United States west-2 region.
77+
Multiple data centers are located in the US state of
78+
Oregon.
79+
7180
endchoice
7281

7382
config TERRAFORM_AWS_REGION
7483
string
7584
output yaml
76-
default "us-west-2" if TERRAFORM_AWS_US_WEST_2
77-
default "us-west-1" if TERRAFORM_AWS_US_WEST_1
78-
default "us-east-2" if TERRAFORM_AWS_US_EAST_2
79-
default "us-east-1" if TERRAFORM_AWS_US_EAST_1
85+
default "us-east-1" if TERRAFORM_AWS_REGION_US_EAST_1
86+
default "us-east-2" if TERRAFORM_AWS_REGION_US_EAST_2
87+
default "us-west-1" if TERRAFORM_AWS_REGION_US_WEST_1
88+
default "us-west-2" if TERRAFORM_AWS_REGION_US_WEST_2
8089

81-
if TERRAFORM_AWS_US_EAST_1
90+
if TERRAFORM_AWS_REGION_US_EAST_1
8291

8392
choice
8493
prompt "AWS East 1 availability zone to use"
@@ -116,9 +125,9 @@ config TERRAFORM_AWS_AV_REGION_EAST_1F
116125

117126
endchoice
118127

119-
endif # TERRAFORM_AWS_US_EAST_1
128+
endif # TERRAFORM_AWS_REGION_US_EAST_1
120129

121-
if TERRAFORM_AWS_US_EAST_2
130+
if TERRAFORM_AWS_REGION_US_EAST_2
122131

123132
choice
124133
prompt "AWS East 2 availability zone to use"
@@ -141,9 +150,9 @@ config TERRAFORM_AWS_AV_REGION_EAST_2C
141150

142151
endchoice
143152

144-
endif # TERRAFORM_AWS_US_EAST_2
153+
endif # TERRAFORM_AWS_REGION_US_EAST_2
145154

146-
if TERRAFORM_AWS_US_WEST_2
155+
if TERRAFORM_AWS_REGION_US_WEST_2
147156

148157
choice
149158
prompt "AWS West 2 AV region to use"
@@ -174,7 +183,7 @@ config TERRAFORM_AWS_AV_REGION_WEST_2D
174183

175184
endchoice
176185

177-
endif # TERRAFORM_AWS_US_WEST_2
186+
endif # TERRAFORM_AWS_REGION_US_WEST_2
178187

179188
config TERRAFORM_AWS_AV_REGION
180189
string

0 commit comments

Comments
 (0)