Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tf_mod_aws_cloudwatch_logs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
steamhaus
tf_mod_aws_cloudwatch_logs
Commits
eb1db165
Commit
eb1db165
authored
Aug 23, 2016
by
A-Gordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cloudwatch logs module
parents
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
+62
-0
assume_role.json
assume_role.json
+13
-0
main.tf
main.tf
+31
-0
role-policy.json
role-policy.json
+18
-0
No files found.
assume_role.json
0 → 100644
View file @
eb1db165
{
"Version"
:
"2012-10-17"
,
"Statement"
:
[
{
"Action"
:
"sts:AssumeRole"
,
"Principal"
:
{
"Service"
:
"ec2.amazonaws.com"
},
"Effect"
:
"Allow"
,
"Sid"
:
""
}
]
}
main.tf
0 → 100644
View file @
eb1db165
resource
"aws_iam_role"
"cloudwatch"
{
name
=
"cloudwatch"
assume_role_policy
=
"
${
file
(
"
${
path
.
module}
/assume_role.json"
)
}
"
lifecycle
{
create_before_destroy
=
true
}
}
resource
"aws_iam_instance_profile"
"cloudwatch"
{
name
=
"cloudwatch"
roles
=
[
"
${
aws_iam_role
.
cloudwatch
.
name
}
"
]
lifecycle
{
create_before_destroy
=
true
}
}
resource
"aws_iam_policy"
"cloudwatch"
{
name
=
"cloudwatch"
policy
=
"
${
file
(
"
${
path
.
module}
/role-policy.json"
)
}
"
}
resource
"aws_iam_policy_attachment"
"cloudwatch"
{
name
=
"cloudwatch"
roles
=
[
"
${
aws_iam_role
.
cloudwatch
.
name
}
"
]
policy_arn
=
"
${
aws_iam_policy
.
cloudwatch
.
arn
}
"
}
output
"name"
{
value
=
"
${
aws_iam_role
.
cloudwatch
.
name
}
"
}
output
"policy"
{
value
=
"
${
aws_iam_policy
.
cloudwatch
.
name
}
"
}
output
"profile_id"
{
value
=
"
${
aws_iam_instance_profile
.
cloudwatch
.
id
}
"
}
\ No newline at end of file
role-policy.json
0 → 100644
View file @
eb1db165
{
"Version"
:
"2012-10-17"
,
"Statement"
:
[
{
"Effect"
:
"Allow"
,
"Action"
:
[
"logs:CreateLogGroup"
,
"logs:CreateLogStream"
,
"logs:PutLogEvents"
,
"logs:DescribeLogStreams"
],
"Resource"
:
[
"arn:aws:logs:*:*:*"
]
}
]
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment