From 0582b4a1475b19636766da4b66a398a4423858c9 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Tue, 7 May 2024 16:25:53 -0400 Subject: [PATCH] fix: dupe resource --- hosts/arrow/aws/ec2.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/arrow/aws/ec2.tf b/hosts/arrow/aws/ec2.tf index 826c036..b4019d1 100644 --- a/hosts/arrow/aws/ec2.tf +++ b/hosts/arrow/aws/ec2.tf @@ -56,7 +56,7 @@ resource "aws_security_group" "instance" { } # Setup IAM for the instance to use SSM -data "aws_iam_policy_document" "instance_profile" { +data "aws_iam_policy_document" "ec2_assume_role" { statement { actions = ["sts:AssumeRole"] principals { @@ -77,7 +77,7 @@ data "aws_iam_policy_document" "instance_profile" { resource "aws_iam_role" "instance_profile" { name = "nixos" - assume_role_policy = data.aws_iam_policy_document.instance_profile.json + assume_role_policy = data.aws_iam_policy_document.ec2_assume_role.json inline_policy { name = "instance-profile" policy = data.aws_iam_policy_document.instance_profile.json