Skip to content

Need unique names for IAM role and policy #5

@bwmetcalf

Description

@bwmetcalf

Describe the Bug

Enabling forwarder_log_enabled and forwarder_vpc_logs_enabled in different module calls causes both to create the IAM role and policy used by the lambda functions using the same name. While the former creates a lambda function using the name dev-test-datadog-forwarder-log and the latter uses dev-test-datadog-forwarder-vpclogs which allows them to coexist, they both use the name dev-test-datadog-forwarder-lambda for the role name and policy which is going to fail.

Note, It is possible to enable both of the above within the same module call to this module and they will share the one IAM role and policy.

Expected Behavior

Each type of lambda that can be enabled by this module should use unique names for all resources created.

Steps to Reproduce

Call this module twice with one enabling forwarder_log_enabled and the other enabling forwarder_vpc_logs_enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions