Skip to content

Commit

Permalink
chore: add tags to test resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Telemaco019 committed Aug 6, 2024
1 parent 8a2f99a commit 9e431cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ terraform {
variable "location" {
type = string
}
variable "tags" {
type = map(any)
}
variable "resource_prefix" {
type = string
}


# ----------- Data Sources ----------- #
Expand All @@ -27,11 +33,13 @@ data "azurerm_resource_group" "main" {

# ----------- Resources ----------- #
resource "azurerm_virtual_network" "main" {
name = "integration-test"
name = format("%s-integration-test", var.resource_prefix)

resource_group_name = data.azurerm_resource_group.main.name
address_space = ["10.0.0.0/16"]
location = var.location

tags = var.tags
}
resource "azurerm_subnet" "main" {
name = "aks-nodes"
Expand Down
1 change: 1 addition & 0 deletions tests/terraform.auto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ resource_prefix = "nbllab"
tags = {
"env" : "integration-test"
"project" : "self-hosted"
"managed-by" : "terraform-test"
}

0 comments on commit 9e431cc

Please sign in to comment.