diff --git a/.gitignore b/.gitignore index 43b43a2..87480c1 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,7 @@ README-generated.md avm.tflint.hcl avm.tflint_example.hcl *tfplan* +*.md.tmp + +# MacOS +.DS_Store diff --git a/examples/default/main.tf b/examples/default/main.tf index 76f9a3d..33dfb89 100644 --- a/examples/default/main.tf +++ b/examples/default/main.tf @@ -52,6 +52,6 @@ module "test" { # source = "Azure/avm--/azurerm" # ... enable_telemetry = var.enable_telemetry # see variables.tf - name = "" # TODO update with module.naming..name_unique + name = "TODO" # TODO update with module.naming..name_unique resource_group_name = azurerm_resource_group.this.name } diff --git a/main.privateendpoint.tf b/main.privateendpoint.tf index 348e9f0..e5c036b 100644 --- a/main.privateendpoint.tf +++ b/main.privateendpoint.tf @@ -10,7 +10,7 @@ resource "azurerm_private_endpoint" "this" { private_service_connection { name = each.value.private_service_connection_name != null ? each.value.private_service_connection_name : "pse-${var.name}" - private_connection_resource_id = azurerm_TODO.this.id + private_connection_resource_id = azurerm_resource_group.TODO.id # TODO: Replace this dummy resource azurerm_resource_group.TODO with your module resource is_manual_connection = false subresource_names = ["TODO subresource name, see https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview#private-link-resource"] } diff --git a/main.tf b/main.tf index 143da1e..1c94190 100644 --- a/main.tf +++ b/main.tf @@ -4,9 +4,9 @@ data "azurerm_resource_group" "parent" { name = var.resource_group_name } -resource "azurerm_TODO_the_resource_for_this_module" "this" { +# TODO: Replace this dummy resource azurerm_resource_group.TODO with your module resource +resource "azurerm_resource_group" "TODO" { name = var.name # calling code must supply the name - resource_group_name = var.resource_group_name location = coalesce(var.location, local.resource_group_location) # etc } @@ -15,13 +15,13 @@ resource "azurerm_TODO_the_resource_for_this_module" "this" { resource "azurerm_management_lock" "this" { count = var.lock.kind != "None" ? 1 : 0 name = coalesce(var.lock.name, "lock-${var.name}") - scope = azurerm_TODO_resource.this.id + scope = azurerm_resource_group.TODO.id # TODO: Replace this dummy resource azurerm_resource_group.TODO with your module resource lock_level = var.lock.kind } resource "azurerm_role_assignment" "this" { for_each = var.role_assignments - scope = azurerm_TODO_resource.this.id + scope = azurerm_resource_group.TODO.id # TODO: Replace this dummy resource azurerm_resource_group.TODO with your module resource role_definition_id = strcontains(lower(each.value.role_definition_id_or_name), lower(local.role_definition_resource_substring)) ? each.value.role_definition_id_or_name : null role_definition_name = strcontains(lower(each.value.role_definition_id_or_name), lower(local.role_definition_resource_substring)) ? null : each.value.role_definition_id_or_name principal_id = each.value.principal_id diff --git a/outputs.tf b/outputs.tf index 0c059e3..bfdc2ee 100644 --- a/outputs.tf +++ b/outputs.tf @@ -3,7 +3,7 @@ # Module owners should include the full resource via a 'resource' output # https://azure.github.io/Azure-Verified-Modules/specs/terraform/#id-tffr2---category-outputs---additional-terraform-outputs output "resource" { - value = azurerm_this_module_resource.this + value = azurerm_resource_group.TODO # TODO: Replace this dummy resource azurerm_resource_group.TODO with your module resource description = "This is the full output for the resource." } diff --git a/variables.tf b/variables.tf index 071170b..1d99e79 100644 --- a/variables.tf +++ b/variables.tf @@ -24,9 +24,8 @@ variable "name" { type = string description = "The name of the this resource." validation { - condition = can(regex("TODO determine REGEX", var.name)) - error_message = "The name must be TODO." - # TODO remove the example below once complete: + condition = can(regex("TODO", var.name)) + error_message = "The name must be TODO." # TODO remove the example below once complete: #condition = can(regex("^[a-z0-9]{5,50}$", var.name)) #error_message = "The name must be between 5 and 50 characters long and can only contain lowercase letters and numbers." }