-
Notifications
You must be signed in to change notification settings - Fork 84
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
feat: azapi v2 support #406
Comments
This needs to be prioritized as you're using ╷
│ Error: Invalid body
│
│ with module.lz-vending.azapi_resource.telemetry_root,
│ on .terraform/modules/lz-vending/main.telemetry.tf line 3, in resource "azapi_resource" "telemetry_root":
│ 3: resource "azapi_resource" "telemetry_root" {
│
│ The argument "body" is invalid: unmarshaling failed: value:
│ "{\"properties\":{\"mode\":\"Incremental\",\"template\":{\"$schema\":\"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\"contentVersion\":\"1.0.0.0\",\"outputs\":{\"telemetry\":{\"type\":\"String\",\"value\":\"For
│ more information, see
│ https://aka.ms/lz-vending/tf/telemetry\"}},\"parameters\":{},\"resources\":[],\"variables\":{}}}}",
│ err: json: cannot unmarshal string into Go value of type
│ map[string]interface {}
╵
╷
│ Error: Invalid Type
│
│ with module.lz-vending.azapi_resource.telemetry_root,
│ on .terraform/modules/lz-vending/main.telemetry.tf line 9, in resource "azapi_resource" "telemetry_root":
│ 9: body = jsonencode({
│ 10: properties = {
│ 11: mode = "Incremental"
│ 12: template = local.telem_arm_subscription_template
│ 13: }
│ 14: })
│
│ The value must not be a string
╵
╷
│ Error: Invalid body
│
│ with module.lz-vending.module.resourcegroup_networkwatcherrg.azapi_resource.rg,
│ on .terraform/modules/lz-vending/modules/resourcegroup/main.tf line 1, in resource "azapi_resource" "rg":
│ 1: resource "azapi_resource" "rg" {
│
│ The argument "body" is invalid: unmarshaling failed: value: "{}", err:
│ json: cannot unmarshal string into Go value of type map[string]interface {}
╵
╷
│ Error: Invalid body
│
│ with module.lz-vending.module.resourcegroup.azapi_resource.rg,
│ on .terraform/modules/lz-vending/modules/resourcegroup/main.tf line 1, in resource "azapi_resource" "rg":
│ 1: resource "azapi_resource" "rg" {
│
│ The argument "body" is invalid: unmarshaling failed: value: "{}", err:
│ json: cannot unmarshal string into Go value of type map[string]interface {}
╵
╷
│ Error: Invalid Type
│
│ with module.lz-vending.module.resourcegroup_networkwatcherrg.azapi_resource.rg,
│ on .terraform/modules/lz-vending/modules/resourcegroup/main.tf line 6, in resource "azapi_resource" "rg":
│ 6: body = jsonencode({})
│
│ The value must not be a string
╵
╷
│ Error: Invalid Type
│
│ with module.lz-vending.module.resourcegroup.azapi_resource.rg,
│ on .terraform/modules/lz-vending/modules/resourcegroup/main.tf line 6, in resource "azapi_resource" "rg":
│ 6: body = jsonencode({})
│
│ The value must not be a string
╵
╷
│ Error: Invalid body
│
│ with module.lz-vending.module.usermanagedidentity.azapi_resource.umi,
│ on .terraform/modules/lz-vending/modules/usermanagedidentity/main.tf line 32, in resource "azapi_resource" "umi":
│ 32: resource "azapi_resource" "umi" {
│
│ The argument "body" is invalid: unmarshaling failed: value: "{}", err:
│ json: cannot unmarshal string into Go value of type map[string]interface {}
╵
╷
│ Error: Invalid Type
│
│ with module.lz-vending.module.usermanagedidentity.azapi_resource.umi,
│ on .terraform/modules/lz-vending/modules/usermanagedidentity/main.tf line 36, in resource "azapi_resource" "umi":
│ 36: body = jsonencode({})
│
│ The value must not be a string
╵
Error: Process completed with exit code 1. |
Hi @ekrof You can introduce your own constraints in your root module whilst we work on this Also checking the lock file into source control can prevent provider upgrades. |
Just realized after posting this. Thanks. The other AVM modules we use still haven't been updated to support Azurerm v4 either, so that's a shame. required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.0, < 5.0"
}
azapi = {
source = "azure/azapi"
version = "~> 1"
}
} |
Update the module to take advantage of the many improvements in azapi v2
The text was updated successfully, but these errors were encountered: