Skip to content

bug: Multiple declarations of a "random" resource with the same name ("uniq") causes plan/applys to fail #172

@pete1uphealth

Description

@pete1uphealth

Describe the bug
Because this module, as well as the iam-role module, both call a resource named random.uniq, it causes any subsequent Terraform deployment to fail with a duplicate resource error.

Steps to reproduce

  1. Deploy this module.
  2. Check the statefile, there will be two random.uniq resources, both with different values.
  3. Attempt to make a change and deploy again, a plan should fail with a duplicate resource error.

Expected behavior
The module should create two random resources, each with a unique name (versus the same name as it currently stands).

Please complete the following information):

  • Terraform Version: 1.5.3
  • Module Version: v2.9.1

Additional context
Also occurs in the terraform-aws-config module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions