Skip to content
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

Error on creating service integration by changing aiven_service_integration_endpoint endpoint_name #1857

Open
matdecat opened this issue Sep 30, 2024 · 0 comments

Comments

@matdecat
Copy link

What happened?

By aiven terraform provider, we manage one datadog integration endpoint named 'datadog_endpoint' linked to our PostgreSQL Aiven service through aiven_service_integration resource. When we want to rename the datadog integration endpoint, we meet this error :

╷
│ Error: error creating service integration: 409: {"errors":[{"message":"Only 1 integration(s) of this type allowed per service","status":409}],"message":"Only 1 integration(s) of this type allowed per service"} -
│
│   with module.core_33_sbox_stack_resources.module.aiven_postgresql["toto-core-33-sbox-agvk-pg-db1"].aiven_service_integration.pg_datadog_integration[0],
│   on ../../modules/aiven/pg/service_pg.tf line 111, in resource "aiven_service_integration" "pg_datadog_integration":
│  111: resource "aiven_service_integration" "pg_datadog_integration" {

What did you expect to happen?

The expected behavior should be just to rename the aiven_service_integration resource that it have been expected by the plan below.

What else do we need to know?

The expected output plan:

  # module.core_33_sbox_stack_resources.aiven_service_integration_endpoint.datadog_endpoint["toto-core-33-sbox-agvk"] must be replaced
+/- resource "aiven_service_integration_endpoint" "datadog_endpoint" {
      ~ endpoint_config = {} -> (known after apply)
      ~ endpoint_name   = "datadog_endpoint" -> "datadog_endpoint_agvk" # forces replacement
      ~ id              = "toto-core-33-sbox-agvk/826e1855-1f15-40d7-950c-xxxxxxxxxxx" -> (known after apply)
        # (2 unchanged attributes hidden)

      ~ datadog_user_config {
          - disable_consumer_stats         = false -> null
          - kafka_consumer_check_instances = 0 -> null
          - kafka_consumer_stats_timeout   = 0 -> null
          - max_partition_contexts         = 0 -> null
            # (2 unchanged attributes hidden)
        }
    }

  # module.core_33_sbox_stack_resources.module.aiven_postgresql["toto-core-33-sbox-agvk-pg-db1"].aiven_service_integration.pg_datadog_integration[0] must be replaced
+/- resource "aiven_service_integration" "pg_datadog_integration" {
      ~ destination_endpoint_id = "toto-core-33-sbox-agvk/826e1855-1f15-40d7-950c-xxxxxxxxxxx" -> (known after apply) # forces replacement
      ~ id                      = "toto-core-33-sbox-agvk/35ebe5e5-96c8-43ba-824c-xxxxxxxxxxx" -> (known after apply)
      ~ integration_id          = "35ebe5e5-96c8-43ba-824c-xxxxxxxxxxx" -> (known after apply)
        # (3 unchanged attributes hidden)

      ~ datadog_user_config {
          - datadog_dbm_enabled        = false -> null
          - datadog_pgbouncer_enabled  = false -> null
          - exclude_consumer_groups    = [] -> null
          - exclude_topics             = [] -> null
          - include_consumer_groups    = [] -> null
          - include_topics             = [] -> null
          - kafka_custom_metrics       = [] -> null
          - max_jmx_metrics            = 0 -> null
          - mirrormaker_custom_metrics = [] -> null

          ~ datadog_tags {
                # (1 unchanged attribute hidden)
            }
          ~ datadog_tags {
                # (1 unchanged attribute hidden)
            }
          ~ datadog_tags {
                # (1 unchanged attribute hidden)
            }
          ~ datadog_tags {
                # (1 unchanged attribute hidden)
            }
          ~ datadog_tags {
                # (1 unchanged attribute hidden)
            }
        }
    }

But in real life (in Aiven console), it creates a new 'aiven_service_integration_endpoint' with the new name and don't remove the old 'aiven_service_integration_endpoint' so this old endpoint is still configured in Aiven Postgresql service integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant