169163334 - Initial VPC TF and structure

169163334 - Make supernet configurable

169163334 - Makes DNS servers configurable

169163334 - Adds bucket for state storage

169163334 - Adds k8s, keyvault, azuread provider

169163334 - Adds route tables

169163334 - Adds route table associations

169163334 - Adds default routes to route tables and fixes route table association flapping
This commit is contained in:
Rob Gil
2019-12-12 11:58:31 -05:00
parent 3f824ccc41
commit 955a1c483b
14 changed files with 355 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
data "azurerm_client_config" "current" {}
resource "azurerm_resource_group" "keyvault" {
name = "${var.name}-${var.environment}-rg"
location = var.region
}
resource "random_id" "server" {
keepers = {
ami_id = 1
}
byte_length = 8
}
resource "azurerm_key_vault" "keyvault" {
name = "${var.name}-${var.environment}-keyvault"
location = azurerm_resource_group.keyvault.location
resource_group_name = azurerm_resource_group.keyvault.name
tenant_id = data.azurerm_client_config.current.tenant_id
sku_name = "premium"
access_policy {
tenant_id = data.azurerm_client_config.current.tenant_id
object_id = data.azurerm_client_config.current.service_principal_object_id
key_permissions = [
"create",
"get",
]
secret_permissions = [
"set",
"get",
"delete",
]
}
tags = {
environment = var.environment
owner = var.owner
}
}

View File

@@ -0,0 +1,19 @@
variable "region" {
type = string
description = "Region this module and resources will be created in"
}
variable "name" {
type = string
description = "Unique name for the services in this module"
}
variable "environment" {
type = string
description = "Environment these resources reside (prod, dev, staging, etc)"
}
variable "owner" {
type = string
description = "Owner of this environment"
}