@@ -266,6 +266,7 @@ resource "aws_iam_role" "instance" {
266
266
name = " ${ var . environment } -instance-role"
267
267
assume_role_policy = length (var. instance_role_json ) > 0 ? var. instance_role_json : templatefile (" ${ path . module } /policies/instance-role-trust-policy.json" , {})
268
268
permissions_boundary = var. permissions_boundary == " " ? null : " ${ var . arn_format } :iam::${ data . aws_caller_identity . current . account_id } :policy/${ var . permissions_boundary } "
269
+ tags = local. tags
269
270
}
270
271
271
272
# ###############################################################################
@@ -275,8 +276,8 @@ resource "aws_iam_policy" "instance_docker_machine_policy" {
275
276
name = " ${ var . environment } -docker-machine"
276
277
path = " /"
277
278
description = " Policy for docker machine."
278
-
279
- policy = templatefile ( " ${ path . module } /policies/instance-docker-machine-policy.json " , {})
279
+ policy = templatefile ( " ${ path . module } /policies/instance-docker-machine-policy.json " , {})
280
+ tags = local . tags
280
281
}
281
282
282
283
resource "aws_iam_role_policy_attachment" "instance_docker_machine_policy" {
@@ -293,8 +294,8 @@ resource "aws_iam_policy" "instance_session_manager_policy" {
293
294
name = " ${ var . environment } -session-manager"
294
295
path = " /"
295
296
description = " Policy session manager."
296
-
297
- policy = templatefile ( " ${ path . module } /policies/instance-session-manager-policy.json " , {})
297
+ policy = templatefile ( " ${ path . module } /policies/instance-session-manager-policy.json " , {})
298
+ tags = local . tags
298
299
}
299
300
300
301
resource "aws_iam_role_policy_attachment" "instance_session_manager_policy" {
@@ -336,11 +337,13 @@ resource "aws_iam_role" "docker_machine" {
336
337
name = " ${ var . environment } -docker-machine-role"
337
338
assume_role_policy = length (var. docker_machine_role_json ) > 0 ? var. docker_machine_role_json : templatefile (" ${ path . module } /policies/instance-role-trust-policy.json" , {})
338
339
permissions_boundary = var. permissions_boundary == " " ? null : " ${ var . arn_format } :iam::${ data . aws_caller_identity . current . account_id } :policy/${ var . permissions_boundary } "
340
+ tags = local. tags
339
341
}
340
342
341
343
resource "aws_iam_instance_profile" "docker_machine" {
342
344
name = " ${ var . environment } -docker-machine-profile"
343
345
role = aws_iam_role. docker_machine . name
346
+ tags = local. tags
344
347
}
345
348
346
349
# ###############################################################################
@@ -369,8 +372,8 @@ resource "aws_iam_policy" "service_linked_role" {
369
372
name = " ${ var . environment } -service_linked_role"
370
373
path = " /"
371
374
description = " Policy for creation of service linked roles."
372
-
373
- policy = templatefile ( " ${ path . module } /policies/service-linked-role-create-policy.json " , { arn_format = var.arn_format })
375
+ policy = templatefile ( " ${ path . module } /policies/service-linked-role-create-policy.json " , { arn_format = var.arn_format })
376
+ tags = local . tags
374
377
}
375
378
376
379
resource "aws_iam_role_policy_attachment" "service_linked_role" {
@@ -393,8 +396,8 @@ resource "aws_iam_policy" "ssm" {
393
396
name = " ${ var . environment } -ssm"
394
397
path = " /"
395
398
description = " Policy for runner token param access via SSM"
396
-
397
- policy = templatefile ( " ${ path . module } /policies/instance-secure-parameter-role-policy.json " , { arn_format = var.arn_format })
399
+ policy = templatefile ( " ${ path . module } /policies/instance-secure-parameter-role-policy.json " , { arn_format = var.arn_format })
400
+ tags = local . tags
398
401
}
399
402
400
403
resource "aws_iam_role_policy_attachment" "ssm" {
@@ -413,8 +416,8 @@ resource "aws_iam_policy" "eip" {
413
416
name = " ${ var . environment } -eip"
414
417
path = " /"
415
418
description = " Policy for runner to assign EIP"
416
-
417
- policy = templatefile ( " ${ path . module } /policies/instance-eip.json " , {})
419
+ policy = templatefile ( " ${ path . module } /policies/instance-eip.json " , {})
420
+ tags = local . tags
418
421
}
419
422
420
423
resource "aws_iam_role_policy_attachment" "eip" {
0 commit comments