terraform-aws-ses icon indicating copy to clipboard operation
terraform-aws-ses copied to clipboard

"Error in function call" when enabled = false

Open syphernl opened this issue 4 years ago • 2 comments

Describe the Bug

After upgrading to the changes in https://github.com/cloudposse/terraform-aws-ses/pull/41 (v0.19.0) with enabled = false running this module results in getting an error:

╷
│ Error: Error in function call
│ 
│   on .terraform/modules/ses/main.tf line 45, in locals:
│   45:   ses_group_name = coalesce(var.ses_group_name, module.this.id)
│     ├────────────────
│     │ module.this.id is ""
│     │ var.ses_group_name is ""
│ 
│ Call to function "coalesce" failed: no non-null, non-empty-string
│ arguments.

It seems that the enabled is not adhered in this particular calculation.

Expected Behavior

No error, since the module is not enabled nothing should be created/generated.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Set enabled = false
  2. Error shown

syphernl avatar Aug 18 '21 07:08 syphernl

@syphernl is this still an issue with the latest version?

nitrocode avatar Sep 15 '22 22:09 nitrocode

Can confirm this is still an issue in 0.24.0

Usage:

module "ses" {
    source  = "cloudposse/ses/aws"
    version = "0.24.0"

    domain = var.domain
}

kurbar avatar Mar 02 '24 00:03 kurbar