Skip to content

Constant drift for invocation_http_parameters #166

Open
@MaxymVlasov

Description

@MaxymVlasov

Description

Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the examples/* directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by running terraform init && terraform apply without any further changes.

If your request is for a new feature, please use the Feature request template.

  • ✋ I have searched the open/closed issues and my issue is not listed.

⚠️ Note

Before you submit an issue, please perform the following first:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. Re-attempt your terraform plan or apply and check if the issue still persists

Versions

  • Module version [Required]: 3.17.1

  • Terraform version: 1.10.5

  • Provider version(s): 5.98.0

Reproduction Code [Required]

locals {
  connections = {
    "autoclockout" = {
      authorization_type = "API_KEY"
      auth_parameters = {
        api_key = {
          key   = "x-TOKEN"
          value = "random_password.token[s.name].result"
        }
      }
    }
  }
}

module "eventbridge" {
  source  = "terraform-aws-modules/eventbridge/aws"
  version = "3.17.1"

  create_connections = true
  connections        = local.connections
}

Steps to reproduce the behavior:
Apply, then plan once again - you'll see constant drift:

  # module.eventbridge["autoclockout"].module.eventbridge.aws_cloudwatch_event_connection.this["autoclockout"] will be updated in-place
  ~ resource "aws_cloudwatch_event_connection" "this" {
        id                 = "autoclockout-connection"
        name               = "autoclockout-connection"
        # (5 unchanged attributes hidden)

      ~ auth_parameters {
          - invocation_http_parameters {
            }

            # (1 unchanged block hidden)
        }
    }

Expected behavior

No constant drift for invocation_http_parameters (which we don't use, as far as I can tell)

Actual behavior

Constant drift, see above

Terminal Output Screenshot(s)

Image

Additional context

I tried to play with

dynamic "invocation_http_parameters" {
for_each = lookup(each.value.auth_parameters, "invocation_http_parameters", null) != null ? [
each.value.auth_parameters.invocation_http_parameters
] : []

but nothing help. Even entire removal of dynamic "invocation_http_parameters" {} doesn't help. I could assume that it's a bug inside provider/AWS itself, but want to double-check with you firstly, that it is not a flaw in module implementation

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