169163334 - Adds TF bucket module
Basic bucket module to create a bucket
This commit is contained in:
parent
8f1cd95236
commit
62a02234a4
18
terraform/modules/bucket/main.tf
Normal file
18
terraform/modules/bucket/main.tf
Normal 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
|
||||||
|
}
|
0
terraform/modules/bucket/outputs.tf
Normal file
0
terraform/modules/bucket/outputs.tf
Normal file
31
terraform/modules/bucket/variables.tf
Normal file
31
terraform/modules/bucket/variables.tf
Normal 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
|
||||||
|
}
|
8
terraform/providers/dev/buckets.tf
Normal file
8
terraform/providers/dev/buckets.tf
Normal 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
|
||||||
|
}
|
@ -1,15 +1,15 @@
|
|||||||
module "k8s" {
|
module "k8s" {
|
||||||
source = "../../modules/k8s"
|
source = "../../modules/k8s"
|
||||||
region = var.region
|
region = var.region
|
||||||
name = var.name
|
name = var.name
|
||||||
environment = var.environment
|
environment = var.environment
|
||||||
owner = var.owner
|
owner = var.owner
|
||||||
k8s_dns_prefix = var.k8s_dns_prefix
|
k8s_dns_prefix = var.k8s_dns_prefix
|
||||||
k8s_node_size = var.k8s_node_size
|
k8s_node_size = var.k8s_node_size
|
||||||
vnet_subnet_id = module.vpc.subnets #FIXME - output from module.vpc.subnets should be map
|
vnet_subnet_id = module.vpc.subnets #FIXME - output from module.vpc.subnets should be map
|
||||||
enable_auto_scaling = true
|
enable_auto_scaling = true
|
||||||
max_count = 5
|
max_count = 5
|
||||||
min_count = 2
|
min_count = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
#module "main_lb" {
|
#module "main_lb" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user