Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cfn/builder/managed_nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (m *ManagedNodeGroupResourceSet) AddAllResources(ctx context.Context) error
}
nodeRole = gfnt.MakeFnGetAttString(cfnIAMInstanceRoleName, "Arn")
} else {
nodeRole = gfnt.NewString(NormalizeARN(m.nodeGroup.IAM.InstanceRoleARN))
nodeRole = gfnt.NewString(m.nodeGroup.IAM.InstanceRoleARN)
}

subnets, err := AssignSubnets(ctx, m.nodeGroup, m.clusterConfig, m.ec2API)
Expand Down
4 changes: 2 additions & 2 deletions pkg/cfn/builder/managed_nodegroup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func TestManagedNodeRole(t *testing.T) {
expectedNodeRoleARN: gfnt.NewString("arn::DUMMY::DUMMYROLE"), // using the provided role
},
{
description: "InstanceRoleARN is provided and normalized",
description: "InstanceRoleARN is provided with path and preserved",
nodeGroup: &api.ManagedNodeGroup{
NodeGroupBase: &api.NodeGroupBase{
IAM: &api.NodeGroupIAM{
Expand All @@ -199,7 +199,7 @@ func TestManagedNodeRole(t *testing.T) {
},
},
expectedNewRole: false,
expectedNodeRoleARN: gfnt.NewString("arn:aws:iam::1234567890:role/custom-eks-role"),
expectedNodeRoleARN: gfnt.NewString("arn:aws:iam::1234567890:role/foo/bar/baz/custom-eks-role"),
},
}

Expand Down
Loading