diff --git a/.github/workflows/terraform-fmt.yaml b/.github/workflows/terraform-fmt.yaml index 1217fa7..91d9746 100644 --- a/.github/workflows/terraform-fmt.yaml +++ b/.github/workflows/terraform-fmt.yaml @@ -11,6 +11,20 @@ on: - '**.tfvars' - '**.tfvars.json' + pull_request: + types: + - opened + - synchronize + - closed + - edited + + branches: + - main + paths: + - '**.tf' + - '**.tfvars' + - '**.tfvars.json' + permissions: contents: write @@ -37,7 +51,7 @@ jobs: - name: Run the tree generation script run: | - terraform fmt -recursive -check + terraform fmt -recursive - name: Commit and Push Changes env: diff --git a/azure-data-share/datashare.tf b/azure-data-share/datashare.tf index e3892ca..e1e2c2a 100644 --- a/azure-data-share/datashare.tf +++ b/azure-data-share/datashare.tf @@ -8,6 +8,9 @@ resource "azurerm_resource_group" "datashare" { ApplicationName = lower(var.application_name) Temporary = upper(var.temporary) } + lifecycle { + ignore_changes = [tags] + } } @@ -25,6 +28,9 @@ resource "azurerm_data_share_account" "datashare" { # https://github.com/Azure/azure-rest-api-specs/issues/9280 # tags = azurerm_resource_group.datashare.tags + lifecycle { + ignore_changes = [tags] + } } @@ -41,4 +47,8 @@ resource "azurerm_data_share" "datashare" { recurrence = var.snapshot_recurrence start_time = local.computed_start_time } + + lifecycle { + ignore_changes = [tags] + } }