mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 16:55:38 +00:00
fix: dupe resource
This commit is contained in:
parent
c06cb27bcc
commit
0582b4a147
@ -56,7 +56,7 @@ resource "aws_security_group" "instance" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Setup IAM for the instance to use SSM
|
# Setup IAM for the instance to use SSM
|
||||||
data "aws_iam_policy_document" "instance_profile" {
|
data "aws_iam_policy_document" "ec2_assume_role" {
|
||||||
statement {
|
statement {
|
||||||
actions = ["sts:AssumeRole"]
|
actions = ["sts:AssumeRole"]
|
||||||
principals {
|
principals {
|
||||||
@ -77,7 +77,7 @@ data "aws_iam_policy_document" "instance_profile" {
|
|||||||
|
|
||||||
resource "aws_iam_role" "instance_profile" {
|
resource "aws_iam_role" "instance_profile" {
|
||||||
name = "nixos"
|
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 {
|
inline_policy {
|
||||||
name = "instance-profile"
|
name = "instance-profile"
|
||||||
policy = data.aws_iam_policy_document.instance_profile.json
|
policy = data.aws_iam_policy_document.instance_profile.json
|
||||||
|
Loading…
Reference in New Issue
Block a user