terraform-provider-azapi icon indicating copy to clipboard operation
terraform-provider-azapi copied to clipboard

Bug: Latest Provider expecting different data types

Open ukhan262 opened this issue 1 year ago • 5 comments

The code has not changed and the error is such.

Image

When I use the provider version 1.15.0, then I do not see any of these issues.

Underlying, I have this module code where the azapi resource block is being used. Image

The module is called like this Image

ukhan262 avatar Oct 21 '24 17:10 ukhan262

v2 no longer supports jsonencode()/jsondecode() for body/output:

  • https://registry.terraform.io/providers/Azure/azapi/latest/docs/guides/2.0-upgrade-guide#dynamic-properties-support
  • https://techcommunity.microsoft.com/t5/azure-tools-blog/announcing-azapi-dynamic-properties/ba-p/4121855

cwe1ss avatar Oct 21 '24 17:10 cwe1ss

It might be good to link to some documentation in the given error message as I'm sure this will happen to many more people.

cwe1ss avatar Oct 21 '24 17:10 cwe1ss

We will try to update the modules..

Typically, the module upgrades guides have this highlighted these type of things.

I have only seen a comment which does not clearly say that we can't use jsondecode/jsonencode going forward

ukhan262 avatar Oct 21 '24 19:10 ukhan262

@ms-henglu for just 2.0 versions can we perhaps implement a link to documentation like @cwe1ss mentioned?

stemaMSFT avatar Oct 21 '24 22:10 stemaMSFT

v2 no longer supports jsonencode()/jsondecode() for body/output:

  • https://registry.terraform.io/providers/Azure/azapi/latest/docs/guides/2.0-upgrade-guide#dynamic-properties-support
  • https://techcommunity.microsoft.com/t5/azure-tools-blog/announcing-azapi-dynamic-properties/ba-p/4121855 @cwe1ss Thank you for the above links. Everything was fine until last Friday. From Monday (21/10/2024), Terraform validate started throwing error. After, removing jsonencode the properties block issues were solved.

DillyBabu avatar Oct 22 '24 12:10 DillyBabu

I'll close this issue as the document link is also included in the error message. Feel free to reopen it if there's any questions.

ms-henglu avatar Dec 05 '24 04:12 ms-henglu