Skip to main content

Required Resource Tags

All Azure resources created with Terraform must include a standard set of tags. These tags are essential for cost tracking, ownership identification, and resource management.

Required Tags

TagDescriptionExample Values
CostCenterBudget tracking identifier"TS000 - Tecnologia e Servizi" for IO
CreatedByHow the resource was createdAlways "Terraform"
EnvironmentDeployment environment"Prod", "Dev", "Uat"
BusinessUnitProduct or business unit"App IO", "CGN", "Carta della Cultura", "IT Wallet", "DevEx"
SourceLink to the Terraform source code"https://github.com/pagopa/<repo>/blob/main/infra/resources/<env>"
ManagementTeamTeam responsible for the resource management"IO Platform", "IO Wallet", "IO Comunicazione", "Developer Experience", etc.

Implementation

Define tags in locals.tf and apply them to all resources:

locals.tf
locals {
tags = {
CostCenter = "TS000 - Tecnologia e Servizi"
CreatedBy = "Terraform"
Environment = "Prod"
BusinessUnit = "App IO"
Source = "https://github.com/pagopa/io-infra/blob/main/infra/resources/prod"
ManagementTeam = "IO Platform"
}
}
main.tf
resource "azurerm_resource_group" "example" {
name = "example-rg"
location = "italynorth"

tags = local.tags
}
Consistent Tagging

Always pass local.tags to resources and modules. Never hardcode tags directly in resources.

Business Units

Common business unit values used at PagoPA:

BusinessUnitDescription
App IOIO mobile application
CGNCarta Giovani Nazionale
Carta della CulturaCultural card initiative
IT WalletDigital wallet initiative
DevExDeveloper Experience team

Management Teams

Common management team values for the IO product:

ManagementTeamArea
IO PlatformPlatform infrastructure
IO WalletWallet features
IO ComunicazioneCommunication features
IO Enti & ServiziServices integration
IO AutenticazioneAuthentication
IO Bonus & PagamentiBonus and payments
IO FirmaDigital signature
Developer ExperienceDevEx team

Environment Values

The Environment tag should match the deployment folder:

FolderEnvironment Tag
dev/"Dev"
uat/"Uat"
prod/"Prod"

Source Tag Format

The Source tag must point to the exact location of the Terraform code in the GitHub repository:

https://github.com/pagopa/<repository>/blob/main/infra/resources/<environment>
Examples
  • https://github.com/pagopa/io-infra/blob/main/infra/resources/prod
  • https://github.com/pagopa/cgn-onboarding-portal/blob/main/infra/resources/dev