terraform-community-modules/tf_aws_ecs

Consistent resource naming convetions

watchwithmike opened this issue · 1 comments

The iam.tf file contains two different resource naming conventions:

The ecs_profile resource uses underscores while all other resource names use hyphens (e.g. ecs-role, ecs-policy, etc...).

Can a consistent convention be used throughout? It appears that underscores _ are more common. Happy to submit a pull request if that's the desired approach.

Cheers,
Mike

tf_aws_ecs/iam.tf

Lines 1 to 7 in f7af3a0

resource "aws_iam_instance_profile" "ecs_profile" {
name_prefix = "${replace(format("%.102s", replace("tf-ECSProfile-${var.name}-", "_", "-")), "/\\s/", "-")}"
role = "${aws_iam_role.ecs-role.name}"
path = "${var.iam_path}"
}
resource "aws_iam_role" "ecs-role" {

@watchwithmike done! i've tagged this as v5.0.0 because i haven't verified that the rename is nondisruptive, please lmk whether you run into trouble with this.

PRs are always welcome, but this was pretty straightforward :)