Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tags iam role #34

Merged
merged 1 commit into from
Jun 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# Cloudwatch
#####
resource "aws_cloudwatch_log_group" "main" {
name = var.name_prefix
name = var.name_prefix

retention_in_days = var.log_retention_in_days
kms_key_id = var.logs_kms_key

kms_key_id = var.logs_kms_key
tags = var.tags
tags = var.tags
}

#####
Expand All @@ -15,6 +16,8 @@ resource "aws_cloudwatch_log_group" "main" {
resource "aws_iam_role" "execution" {
name = "${var.name_prefix}-task-execution-role"
assume_role_policy = data.aws_iam_policy_document.task_assume.json

tags = var.tags
}

resource "aws_iam_role_policy" "task_execution" {
Expand All @@ -37,6 +40,8 @@ resource "aws_iam_role_policy" "read_repository_credentials" {
resource "aws_iam_role" "task" {
name = "${var.name_prefix}-task-role"
assume_role_policy = data.aws_iam_policy_document.task_assume.json

tags = var.tags
}

resource "aws_iam_role_policy" "log_agent" {
Expand Down