Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
move modules
Browse files Browse the repository at this point in the history
  • Loading branch information
MGTheTrain committed Apr 28, 2024
1 parent edcd4b2 commit 2724fc1
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 56 deletions.
14 changes: 13 additions & 1 deletion devops/terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "main" {
source = "git::https://github.com/MGTheTrain/gitops-ftw.git//devops/terraform?ref=main"
digital_product_affix = var.digital_product_affix
digital_product_affix = var.digital_product_affix_sa
environment = var.environment
resource_instance_number = var.resource_instance_number
location = var.location
Expand All @@ -9,4 +9,16 @@ module "main" {
sa_account_tier = var.sa_account_tier
sa_account_replication_type = var.sa_account_replication_type
sc_container_access_type = var.sc_container_access_type
}

module "acr" {
source = "../../terraform/modules/acr"
digital_product_affix = var.digital_product_affix_acr_module
environment = var.environment
resource_instance_number = var.resource_instance_number
location = var.location
team = var.team
number_of_container_registries = var.number_of_container_registries
acr_sku = var.acr_sku
acr_admin_enabled = var.acr_admin_enabled
}
13 changes: 13 additions & 0 deletions devops/terraform/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ACR
output "container_registry_admin_username_list" {
value = module.acr.container_registry_admin_username_list
}

output "container_registry_admin_password_list" {
value = module.acr.container_registry_admin_password_list
sensitive = true
}

output "container_registry_login_server_list" {
value = module.acr.container_registry_login_server_list
}
29 changes: 27 additions & 2 deletions devops/terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Azure Rg
variable "digital_product_affix" {
variable "digital_product_affix_sa" {
default = "gftfbe"
description = "The digital product affix."
description = "The digital product affix of the Storage Account module."
type = string
}

variable "digital_product_affix_acr_module" {
default = "mlopsftwcr"
description = "The digital product affix of the acr module."
type = string
}

Expand Down Expand Up @@ -52,4 +58,23 @@ variable "sc_container_access_type" {
default = "private"
description = "Container access type of the Storage Account Container"
type = string
}

# Azure Container Registry
variable "number_of_container_registries" {
default = 1
description = "The total number of Azure Container registries to deploy."
type = number
}

variable "acr_sku" {
description = "SKU for the Azure Container Registry"
type = string
default = "Basic"
}

variable "acr_admin_enabled" {
description = "Flag to enable admin user for the Azure Container Registry"
type = bool
default = true
}
14 changes: 1 addition & 13 deletions terraform/envs/sbx-k8s-deployment/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "az" {
source = "git::https://github.com/MGTheTrain/gitops-ftw.git//terraform/modules/az?ref=main"
digital_product_affix = var.digital_product_affix_az_module
digital_product_affix = var.digital_product_affix
environment = var.environment
resource_instance_number = var.resource_instance_number
location = var.location
Expand All @@ -13,16 +13,4 @@ module "az" {
aks_max_node_count = var.aks_max_node_count
aks_vm_size = var.aks_vm_size
aks_os_disk_size_gb = var.aks_os_disk_size_gb
}

module "acr" {
source = "../../modules/acr"
digital_product_affix = var.digital_product_affix_acr_module
environment = var.environment
resource_instance_number = var.resource_instance_number
location = var.location
team = var.team
number_of_container_registries = var.number_of_container_registries
acr_sku = var.acr_sku
acr_admin_enabled = var.acr_admin_enabled
}
14 changes: 0 additions & 14 deletions terraform/envs/sbx-k8s-deployment/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,4 @@ output "aks_name_list" {
output "aks_kube_config_list" {
value = module.az.aks_kube_config_list
sensitive = true
}

# ACR
output "container_registry_admin_username_list" {
value = module.acr.container_registry_admin_username_list
}

output "container_registry_admin_password_list" {
value = module.acr.container_registry_admin_password_list
sensitive = true
}

output "container_registry_login_server_list" {
value = module.acr.container_registry_login_server_list
}
27 changes: 1 addition & 26 deletions terraform/envs/sbx-k8s-deployment/variables.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
variable "digital_product_affix_az_module" {
variable "digital_product_affix" {
default = "mlopsftwaz"
description = "The digital product affix of the az module."
type = string
}

variable "digital_product_affix_acr_module" {
default = "mlopsftwcr"
description = "The digital product affix of the acr module."
type = string
}

variable "environment" {
default = "sbx"
description = "The environment."
Expand Down Expand Up @@ -80,23 +74,4 @@ variable "aks_os_disk_size_gb" {
type = string
default = "128"
description = "The AKS Agent Operating System disk size in GB"
}

# Azure Container Registry
variable "number_of_container_registries" {
default = 1
description = "The total number of Azure Container registries to deploy."
type = number
}

variable "acr_sku" {
description = "SKU for the Azure Container Registry"
type = string
default = "Basic"
}

variable "acr_admin_enabled" {
description = "Flag to enable admin user for the Azure Container Registry"
type = bool
default = true
}

0 comments on commit 2724fc1

Please sign in to comment.