# Configure the Azure provider
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "=3.19.0"
    }
    time = {
      source  = "hashicorp/time"
      version = "=0.7.2"
    }
  }
}

provider "azurerm" {
  features {}
  subscription_id            = var.subscription_id
  skip_provider_registration = true

  storage_use_azuread = true
  use_oidc            = true
}

module "naming" {
  source  = "Azure/naming/azurerm"
  version = "0.2.0"
  prefix  = var.resource_prefix != "" ? [var.resource_prefix] : []
  suffix = [
    var.environment_tag,
    var.workload_code
  ]
}

data "azurerm_client_config" "current" {
}

