Skip to content

Provider produces invalid plan when removing dynamic "rule" blocks from autotag_v2 #360

@mattBaumBeneva

Description

@mattBaumBeneva

Describe the bug
We are currently migrating some of our configurations from an old autotag_v2 to a newer module. The autotag_v2 config generates "rule" blocks dynamically (ex.: dynamic "rule" {...}) and the for_each arguments are based on lists.

The apply step fails with the following error:

12:13:40  │ Error: Given property 'valueNormalization' with value: '' violates the following constraint: Value must be one of [Leave text as-is, To upper case, To lower case].
12:13:40  │ Given property 'type' with value: '' violates the following constraint: Value must be one of [ME, SELECTOR].
12:13:40  │ 
12:13:40  │   with dynatrace_autotag_v2.globale-proprietaire,
12:13:40  │   on TAG_globale-proprietaire.tf line 55, in resource "dynatrace_autotag_v2" "globale-proprietaire":
12:13:40  │   55: resource "dynatrace_autotag_v2" "globale-proprietaire" {

It seems thet the provider is generating an invalid plan for this ressource, which contains the following block:

12:13:14            + rule {
12:13:14              }

This obviously fails, because "valueNormalization" is required, as are other fields.

Expected behavior
It should be possible to remove any number of dynamically created "rule" blocks. It should also be possible to eventually destroy the entire old "autotag_v2" object.

Additional context
Provider version 1.46.1

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions