79318924

Date: 2024-12-31 00:47:16
Score: 2.5
Natty:
Report link

Same issue,

Disabling works, thoughts?

# Import and Disable Default Repo
data "azuredevops_git_repository" "lab_001_default" {
  project_id = azuredevops_project.lab_001.id
  name       = azuredevops_project.lab_001.name
}

resource "azuredevops_git_repository" "lab_001_default" {
  project_id     = azuredevops_project.lab_001.id
  name           = azuredevops_project.lab_001.name
  disabled       = true
  initialization {
    # I assume the default is Uninitialized, but this is ignore_changes so I
    # dont think we should care.
    init_type = "Uninitialized"
  }
  lifecycle {
    ignore_changes = [
      # Ignore changes to initialization to support importing existing repositories
      # Given that a repo now exists, either imported into terraform state or created by terraform,
      # we don't care for the configuration of initialization against the existing resource
      initialization,
    ]
  }
}

import {
  id = join("/", [
    data.azuredevops_git_repository.lab_001_default.project_id,
    data.azuredevops_git_repository.lab_001_default.id
  ])
  to = azuredevops_git_repository.lab_001_default
}
Reasons:
  • RegEx Blacklisted phrase (1): Same issue
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: igpapatha