UPD: moved around variables

This commit is contained in:
xpk 2020-04-23 12:10:57 +08:00
parent b1629f2696
commit 6523b75af4
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86
2 changed files with 19 additions and 24 deletions

View File

@ -12,10 +12,21 @@ These config will create the following resources on AWS. The VPC CIDR is hard-co
These are required variables, which can be set in terraform.tfvars
```
# general variables
resource_prefix = "unspecified"
globalTags {
"Environment" = "KFLAB"
"TerraformiCliVersion" = "0.12.24"
"TerraformMode" = "InitialDeploymentOnly"
"Ticket" = "NotApplicable"
}
# aws provider variables
aws_access_key = "redacted"
aws_secret_key = "redacted"
aws_region = "ap-southeast-1"
resource_prefix = "project1-dev"
aws_region = "ap-east-1"
resource_prefix = "kflab-dev"
```
## Revision notes

View File

@ -1,30 +1,14 @@
/* Hard coded values
DPTicket tag
Terraform version
VPC name tag
VPC CIDR
Subnet octets
*/
variable "globalTags" {
type = "map"
default {}
}
variable "resource_prefix" {}
terraform {
required_version = ">= 0.9.9"
}
variable "globalTags" {
type = "map"
default {
"Environment" = "KFLAB"
"TerraformiCliVersion" = "0.12.24"
"TerraformMode" = "InitialDeploymentOnly"
"Ticket" = "NotApplicable"
}
}
variable "resource_prefix" {
default = "unspecified"
}
# VPC
resource "aws_vpc" "tf-vpc1" {
cidr_block = "10.10.0.0/16"