169163334 - Adds TF bucket module

Basic bucket module to create a bucket
This commit is contained in:
Rob Gil 2019-12-26 12:05:24 -05:00
parent 8f1cd95236
commit 62a02234a4
5 changed files with 67 additions and 10 deletions

View File

@ -0,0 +1,18 @@
resource "azurerm_resource_group" "bucket" {
name = "${var.name}-${var.environment}-${var.service_name}"
location = var.region
}
resource "azurerm_storage_account" "bucket" {
name = var.service_name
resource_group_name = azurerm_resource_group.bucket.name
location = azurerm_resource_group.bucket.location
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "azurerm_storage_container" "bucket" {
name = "content"
storage_account_name = azurerm_storage_account.bucket.name
container_access_type = var.container_access_type
}

View File

View File

@ -0,0 +1,31 @@
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 the environment and resources created in this module"
}
variable "container_access_type" {
default = "private"
description = "Access type for the container (Default: private)"
type = string
}
variable "service_name" {
description = "Name of the service using this bucket"
type = string
}

View File

@ -0,0 +1,8 @@
module "task_order_bucket" {
source = "../../modules/bucket"
service_name = "tasksatat"
owner = var.owner
name = var.name
environment = var.environment
region = var.region
}

View File

@ -1,15 +1,15 @@
module "k8s" {
source = "../../modules/k8s"
region = var.region
name = var.name
environment = var.environment
owner = var.owner
k8s_dns_prefix = var.k8s_dns_prefix
k8s_node_size = var.k8s_node_size
vnet_subnet_id = module.vpc.subnets #FIXME - output from module.vpc.subnets should be map
source = "../../modules/k8s"
region = var.region
name = var.name
environment = var.environment
owner = var.owner
k8s_dns_prefix = var.k8s_dns_prefix
k8s_node_size = var.k8s_node_size
vnet_subnet_id = module.vpc.subnets #FIXME - output from module.vpc.subnets should be map
enable_auto_scaling = true
max_count = 5
min_count = 2
max_count = 5
min_count = 2
}
#module "main_lb" {