diff --git a/main.tf b/main.tf index 72684c66..72c5f3e4 100644 --- a/main.tf +++ b/main.tf @@ -8,12 +8,14 @@ # provider "azurerm" { - subscription_id = var.subscription_id - client_id = var.client_id - client_secret = var.client_secret - tenant_id = var.tenant_id - partner_id = var.partner_id - use_msi = var.use_msi + subscription_id = var.subscription_id + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + partner_id = var.partner_id + use_msi = var.use_msi + resource_provider_registrations = var.resource_provider_registrations + resource_providers_to_register = var.resource_providers_to_register features {} } diff --git a/variables.tf b/variables.tf index 7c80723b..29c29d26 100644 --- a/variables.tf +++ b/variables.tf @@ -30,6 +30,23 @@ variable "use_msi" { default = false } +variable "resource_provider_registrations" { + description = "Set mode to determine the collection of resource providers to automatically register on the subscription" + type = string + default = "core" + + validation { + condition = contains(["core", "extended", "all", "none", "legacy"], var.resource_provider_registrations) + error_message = "ERROR: Valid types are \"core\", \"extended\", \"all\", \"none\" and \"legacy\"!" + } +} + +variable "resource_providers_to_register" { + description = "A custom list of RPs to explicitly register for the subscription, in addition to those specified by the resource_provider_registrations property" + type = list(string) + default = null +} + variable "msi_network_roles" { description = "Managed Identity permissions for VNet and Route Table" type = list(string)