favoretti / terraform-provider-adx

Mozilla Public License 2.0
14 stars 5 forks source link

resource adx_encoding_policy: Delete must be implemented #54

Closed markti closed 1 year ago

markti commented 1 year ago

Is there an existing issue for this?

Terraform Version

1.5.5

ADX Provider Version

0.0.21

Terraform Configuration Files

terraform {
  required_providers {
    adx = {
      source  = "favoretti/adx"
      version = "~> 0.0.21"
    }
  }
  backend "azurerm" {
  }
}

provider "adx" {
  adx_endpoint = var.adx_cluster_uri
}

variable "adx_cluster_uri" {
  type = string
}
variable "adx_database_name" {
  type = string
}
variable "metrics" {
  type = list(string)
}

locals {
  # convert metrics to a map
  metric_map = { for name in var.metrics : name => name }
}

resource "adx_table" "metric" {
  for_each = local.metric_map

  name          = each.key
  database_name = var.adx_database_name

  column {
    name = "name"
    type = "string"
  }
  column {
    name = "value"
    type = "decimal"
  }
  column {
    name = "vm_id"
    type = "string"
  }
  column {
    name = "resource_id"
    type = "string"
  }
  column {
    name = "timestamp"
    type = "datetime"
  }

}

Debug Output/Panic Output

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
╷
│ Error: InternalValidate
│ 
│   with provider["registry.terraform.io/favoretti/adx"],
│   on versions.tf line 12, in provider "adx":
│   12: provider "adx" {
│ 
│ Internal validation of the provider failed! This is always a bug
│ with the provider itself, and not a user issue. Please report
│ this bug:
│ 
│ 1 error occurred:
│   * resource adx_encoding_policy: Delete must be implemented
│ 
│ 
╵
Error: Process completed with exit code 1.

Expected Behaviour

no changes to the code, should come back with terraform plan = no changes.

Actual Behaviour

failed due to "resource adx_encoding_policy: Delete must be implemented"

Steps to Reproduce

No response

Important Factoids

No response

References

No response

FakieHeelflip commented 1 year ago

@markti Thanks for raising the bug. For a quick fix use v.0.0.23 or below:

version = "0.0.23"

I will fix that issue today in v.0.0.24

markti commented 1 year ago

I think I fixed it by picking a specific version of the provider. It was auto-upgrading and the new version caused the problem.

FakieHeelflip commented 1 year ago

Yes, you will fix it by picking a specific version which is NOT v0.0.24. :)

But iIwill fix 0.0.24 right now.

FakieHeelflip commented 1 year ago

PR ist open: #55

FakieHeelflip commented 1 year ago

55 was merged. This should solve this issue.