Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tf_mod_aws_elb
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
steamhaus
tf_mod_aws_elb
Commits
c3fab279
Commit
c3fab279
authored
Aug 08, 2018
by
Adrian Horrocks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
creating s3 bucket and policy
parent
3a4f81b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
main.tf
main.tf
+33
-0
No files found.
main.tf
View file @
c3fab279
...
@@ -138,6 +138,39 @@ resource "aws_elb" "main" {
...
@@ -138,6 +138,39 @@ resource "aws_elb" "main" {
}
}
}
}
#############################################################################################################
# S3 Bucket for Log Exports
#############################################################################################################
data
"aws_elb_service_account"
"main"
{}
resource
"aws_s3_bucket"
"elb_logs"
{
bucket
=
"
${
var
.
name
}
-elb_logs"
acl
=
"private"
policy
=
<<
POLICY
{
"Id": "Policy",
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:PutObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::${var.name}-elb_logs/AWSLogs/*",
"Principal": {
"AWS": [
"${data.aws_elb_service_account.main.arn}"
]
}
}
]
}
POLICY
}
#############################################################################################################
#############################################################################################################
# Outputs
# Outputs
#############################################################################################################
#############################################################################################################
...
...
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