Skip to content

UnsupportedAddonModification When Adding Prometheus Configuration to amazon-cloudwatch-observability Addon #173

@viram99

Description

@viram99

Description:
I'm encountering an issue while attempting to configure the amazon-cloudwatch-observability addon for EKS using Terraform. The configuration applies successfully without the Prometheus section. However, when I add Prometheus support, the addon update fails with the following error:

waiting for EKS Add-On (dev1:amazon-cloudwatch-observability) update (0735ecff-d911-33f8-a1f9-8d6d3b18b841): unexpected state 'Failed', wanted target 'Successful'. last error: : UnsupportedAddonModification: Amazon EKS was unable to complete the addon operation. The configuration values provided are invalid.

Terraform configuration

resource "aws_eks_addon" "amazon-cloudwatch-observability" {
  cluster_name       = var.name
  addon_name         = "amazon-cloudwatch-observability"
  addon_version      = "v3.0.0-eksbuild.1"
  resolve_conflicts_on_update = "OVERWRITE"  # Ensure conflicts are resolved by overwriting existing configs

  configuration_values = jsonencode({
    admissionWebhooks = {
      certManager = {
        enabled = true
      }
    }
    agent = {
      config = {
        logs = {
          metrics_collected = {
            emf = {}
            kubernetes = {
              accelerated_compute_metrics = false
              enhanced_container_insights = true
            }
          }
          force_flush_interval = 5
        }
      }
      prometheus = {
        config = jsonencode({
          "global" = {
            "scrape_interval" = "10s"
            "scrape_timeout"  = "10s"
          }
        })
      }
    }
    containerLogs = {
      enabled = false
    }
  })

  depends_on = [helm_release.cert_manager]
}

Steps to Reproduce:

Apply the above Terraform configuration with the Prometheus block included.
Observe the failure message related to UnsupportedAddonModification.
Expected Behavior:
The addon should update successfully with the Prometheus configuration.

Actual Behavior:
The addon fails to update, citing invalid configuration values.

Additional Information:

Removing the prometheus block resolves the error, but Prometheus support is essential for my use case.
I'm following this configuration example from the official Helm chart repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions