Skip to content

Commit 8c2a922

Browse files
committed
Add instance profile for bastion instance
1 parent 23e94f4 commit 8c2a922

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ resource "aws_instance" "this" {
4141
associate_public_ip_address = true
4242
subnet_id = var.subnet_id
4343
vpc_security_group_ids = concat(var.security_group_ids, [aws_security_group.this.id])
44+
iam_instance_profile = var.instance_profile != "" ? var.instance_profile : null
4445

4546
monitoring = true
4647

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,8 @@ variable "instance_profiles" {
111111
#}
112112
}
113113

114+
115+
variable "instance_profile" {
116+
default = {}
117+
description = "Instance profile role ARN for instances"
118+
}

0 commit comments

Comments
 (0)