This commit is contained in:
John Spinella 2023-01-23 11:52:58 -05:00
Родитель 105538edf1
Коммит 06cd97295a
5 изменённых файлов: 0 добавлений и 149 удалений

Просмотреть файл

@ -1,23 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
data "azurerm_client_config" "current" {}
module "management_groups" {
source = "../../modules/Microsoft.Management/managementGroups"
root_parent_id = data.azurerm_client_config.current.tenant_id
root_id = var.root_id
root_name = var.root_display_name
landing_zones = var.management_groups
tags = merge(var.tags, {
DeployedBy = format("AzureNoOpsTF [%s]", terraform.workspace)
})
}
output "management_groups" {
value = module.management_groups.management_groups
}

Просмотреть файл

@ -1,60 +0,0 @@
# Terraform Enclave Support Overlays Folders
## Overview
## Management Groups Folder
Management Groups is the basis on creating a modular Management Groups network designs. This core is used in Mission Enclave creations.
## Management Groups Folder Structure
The Management Groups folder structure is as follows:
```bash
├───managementGroups
│ ├───main.tf
│ ├───outputs.tf
│ └───variables.tf
└───readme.md
```
## Management Groups Modules
The Management Groups modules are as follows:
### Main
The main module is used to create the Management Groups.
```hcl
module "management_groups" {
source = "../../modules/Microsoft.Management/managementGroups"
root_parent_id = data.azurerm_client_config.current.tenant_id
root_id = var.root_id
root_name = var.root_display_name
landing_zones = var.management_groups
tags = merge(var.tags, {
deployed-by = format("AzureNoOpsTF [%s]", terraform.workspace)
})
}
```
## Inputs
The following table lists the configurable parameters of the Management Groups module and their default values.
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| root_id | The ID of the root Management Group | string | n/a | yes |
| root_display_name | The name of the root Management Group | string | n/a | yes |
| management_groups | The Management Groups to create | list | n/a | yes |
## Outputs
The following table lists the outputs of the Management Groups module.
| Name | Description |
|------|-------------|
| management_groups | The Management Groups created |

Просмотреть файл

@ -1,48 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
variable "root_id" {
type = string
description = "If specified, will set a custom Name (ID) value for the \"root\" Management Group"
default = "im"
validation {
condition = can(regex("^[a-zA-Z0-9-]{2,10}$", var.root_id))
error_message = "Value must be between 2 to 10 characters long, consisting of alphanumeric characters and hyphens."
}
}
variable "root_display_name" {
type = string
description = "If specified, will set a custom Display Name value for the \"root\" Management Group."
default = "im-root"
validation {
condition = can(regex("^[A-Za-z][A-Za-z0-9- ._]{1,22}[A-Za-z0-9]?$", var.root_display_name))
error_message = "Value must be between 2 to 24 characters long, start with a letter, end with a letter or number, and can only contain space, hyphen, underscore or period characters."
}
}
variable "management_groups" {
type = map(object({
management_group_name = string
display_name = string
parent_management_group_id = string
subscription_ids = list(string)
}))
description = "The list of management groups to be created."
default = {
"root" = {
display_name = "anoa"
management_group_name = "anoa"
parent_management_group_id = "value"
subscription_ids = []
}
}
}
variable "tags" {
type = map(string)
description = "The tags of the management group."
default = {}
}

Просмотреть файл

@ -1,18 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
/*
SUMMARY: Module to deploy a SQL Database to the Hub Network
DESCRIPTION: The following components will be options in this deployment
SQL Database
SQL Server
AUTHOR/S: jspinella
*/
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
}
}
}

Просмотреть файл