Skip to content

Commit

Permalink
Merge pull request #415 from imperva/cpapke/max-role-name-length
Browse files Browse the repository at this point in the history
Limit role name length
  • Loading branch information
jsonar-cpapke authored Jun 24, 2024
2 parents 065b28e + b4f4ee7 commit f7106cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iam_role.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ resource "aws_iam_instance_profile" "dsf_node_instance_iam_profile" {

resource "aws_iam_role" "dsf_node_role" {
count = var.instance_profile_name == null ? 1 : 0
name = "${var.name}-role"
name = "${substr(var.name, 0, 64-length("-role"))}-role"
managed_policy_arns = null
assume_role_policy = local.role_assume_role_policy
inline_policy {
Expand Down

0 comments on commit f7106cd

Please sign in to comment.