Skip to content

Commit

Permalink
Attach IAM instance profile to containerized server EC2
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessOne91 committed Jan 16, 2025
1 parent 4480a0f commit 55bef89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend_modules/aws/host/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ resource "aws_instance" "instance" {
subnet_id = var.connect_to_base_network ? (local.provider_settings["public_instance"] ? local.public_subnet_id : local.private_subnet_id) : var.connect_to_additional_network ? local.private_additional_subnet_id : local.private_subnet_id
vpc_security_group_ids = [var.connect_to_base_network ? (local.provider_settings["public_instance"] ? local.public_security_group_id : local.private_security_group_id) : var.connect_to_additional_network ? local.private_additional_security_group_id : local.private_security_group_id]
private_ip = local.private_ip
iam_instance_profile = contains(var.roles, "server") ? var.base_configuration["iam_instance_profile"] : null
iam_instance_profile = contains(var.roles, "server") || contains(var.roles, "server_containerized") ? var.base_configuration["iam_instance_profile"] : null

root_block_device {
volume_size = local.provider_settings["volume_size"]
Expand Down

0 comments on commit 55bef89

Please sign in to comment.