Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the file attribute in azuredevops_git_repository_file will not delete and create the old file without changing the ressource name #1073

Open
philippfrenzel opened this issue Jun 14, 2024 · 0 comments
Labels

Comments

@philippfrenzel
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and Azure DevOps Provider) Version

Task : Terraform
Description : Execute terraform commands to manage resources on AzureRM, Amazon Web Services(AWS) and Google Cloud Platform(GCP)
Version : 4.238.25
Author : Microsoft Corporation
Help : Learn more about this task

Affected Resource(s)

resource "azuredevops_git_repository" "synapse_backend" {
  project_id     = data.azuredevops_project.workbench.id
  name           = "dap-synapse-backend"
  default_branch = "refs/heads/main"
  initialization {
    init_type = "Clean"
  }
  lifecycle {
    ignore_changes = [
      initialization,
    ]
  }
}


resource "azuredevops_git_repository_file" "default_synapse_yml_testdir" {
  count               = length(azuredevops_git_repository.synapse_backend)
  repository_id       = azuredevops_git_repository.synapse_backend.id
  file                = "testdir/azure-pipelines.yml"
  content             = file("${path.module}/assets/syn-release.yml")
  branch              = "refs/heads/main"
  commit_message      = "Add Azure-pipelines in a new folder.yml"
  overwrite_on_create = true

  lifecycle {
    ignore_changes = [
      file,
      content,
      commit_message
    ]
  }
}
  • azuredevops_1.1.11

Terraform Configuration Files

see above

Debug Output

Non, says it worked, but didn't

Expected Behavior

Move a file from one directory to another

Actual Behavior

File keeps untouched

Steps to Reproduce

Modify e.g. the filename from test.yml to testtwo.yml without changing anything else within your terraform.

  1. terraform apply
@xuzhang3 xuzhang3 added the bug label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants