Skip to content

aws_cloudwatch_log_group not destroyed when enabled=false #181

Open
@bartelemi

Description

@bartelemi

Describe the Bug

aws_cloudwatch_log_group resource should respect the context.enabled flag.
Right now I have to set cloudwatch_log_group_enabled as well as enabled to false to destroy all the resources.

Expected Behavior

Setting up the enabled flag from the context should be enough to deprovision all the resources.

Steps to Reproduce

  1. Deploy this module to your AWS cloud.
  2. In next iteration, set the enabled flag to false
  3. Run the terraform apply command
  4. See error:
Error: "name" isn't a valid log group name (alphanumeric characters, underscores, hyphens, slashes, hash signs and dots are allowed): ""
  with aws_cloudwatch_log_group.app[0],
  on main.tf line 18, in resource "aws_cloudwatch_log_group" "app":
  18:   name              = module.this.id

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions