microsoft / terraform-provider-azuredevops

Terraform Azure DevOps provider
https://www.terraform.io/docs/providers/azuredevops/
MIT License
380 stars 271 forks source link

with 1.1.0 applying on windows then applying on ubuntu leads to TONS of no change/changes #1056

Closed drdamour closed 3 months ago

drdamour commented 4 months ago

This started with 1.1 wasnt happening before.

If i apply on a windows host a subsequent apply on an ubuntu host shows tons of "no changes" changes in the plan for many different resource types such as

# module.x_prod_sql_export.azuredevops_serviceendpoint_azurerm.export_service_connection will be updated in-place
  ~ resource "azuredevops_serviceendpoint_azurerm" "export_service_connection" {
        id                                     = "b63838ac-12a8-4ccf-bfd9-f9031daca344"
        # (10 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

and

# module.app_a.module.codebase.azuredevops_build_definition.pipeline_build will be updated in-place
  ~ resource "azuredevops_build_definition" "pipeline_build" {
        id              = "133"
        name            = "a"
        # (6 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

i'm thinking this is something to do with end of line stuff being different in json serializer or something?

Community Note

Terraform (and Azure DevOps Provider) Version

Affected Resource(s)

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

xuzhang3 commented 4 months ago

@drdamour can you check file line endings? Not sure if relate to the CRLF and LF difference or other encoding issues between different platform.

drdamour commented 4 months ago

@xuzhang3 well i got a chance to look deeper..and state files seem to not be the cause. They appear to be the same bo matter how i compare em.

had other people in my team have this same problem. Something with the windows vs unix is seeing differences that arent there.

but i cant seem to track it down. In windows we are running 1.8 cli and in unix 1.6 so gonna revert win to 1.6 and see if thats it or vice versa.

drdamour commented 3 months ago

got another chance to look into this. seems to be related to applying with tf 1.8 and then planning subsequently with tf 1.6.

not sure why only this resource and only at this version caused it...but getting everything to 1.8 resolved the issue so closing.