Skip to content

Commit

Permalink
feat(DMVP-iam-role): Iam Role
Browse files Browse the repository at this point in the history
  • Loading branch information
aramkarapetian committed Oct 30, 2023
1 parent 0440798 commit cf11188
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/role/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resource "aws_iam_policy" "this" {
name = var.name
description = var.description

policy = var.policy
}

resource "aws_iam_role" "aws-role" {
name = var.name

assume_role_policy = var.trust_policy
}

resource "aws_iam_role_policy_attachment" "AWSRole" {
policy_arn = aws_iam_policy.this.arn
role = aws_iam_role.aws-role.name
}
15 changes: 15 additions & 0 deletions modules/role/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
variable "name" {
type = string
}

variable "description" {
type = string
}

variable "policy" {
type = any
}

variable "trust_policy" {
type = any
}

0 comments on commit cf11188

Please sign in to comment.