Refactor the variables into their own terraform plan

This commit is contained in:
R. Tyler Croy 2017-11-13 14:16:03 -08:00
parent 66e4a95e62
commit 4b87b26b16
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
2 changed files with 24 additions and 41 deletions

View File

@ -1,49 +1,8 @@
# Configure the terraform Azure provider
variable "subscription_id" {}
variable "client_id" {}
variable "client_secret" {}
variable "tenant_id" {}
variable "prefix" {
type = "string"
default = "codevaletdev"
}
variable "dnsprefix" {
type = "string"
default = ""
}
variable "env" {
type = "string"
default = "dev"
}
variable "region" {
type = "string"
default = "East US 2"
}
variable "k8s_master_name" {
type = "string"
# Cannot contain interpolations? wompwomp
default = "codevaletdev-k8s-master"
}
variable "k8s_agents" {
type = "string"
default = "1"
}
provider "azurerm" {
subscription_id = "${var.subscription_id}"
client_id = "${var.client_id}"
client_secret = "${var.client_secret}"
tenant_id = "${var.tenant_id}"
}
provider "kubernetes" {
config_context_auth_info = "${var.k8s_master_name}-admin"
config_context_cluster = "${var.k8s_master_name}"
}

24
plans/variables.tf Normal file
View File

@ -0,0 +1,24 @@
#
# Variables for plugging in various environment specific settings
#
variable "env" {
type = "string"
default = "dev"
}
variable "region" {
type = "string"
default = "West US"
}
#
# Variables which should be kept secret
# and provided by a --var-file
#######################################
variable "subscription_id" {}
variable "client_id" {}
variable "client_secret" {}
variable "tenant_id" {}
#######################################