-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtemplate.yaml
48 lines (44 loc) · 1.23 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# -*- coding: utf-8 -*-
# Copyright (c) 2016-present, CloudZero, Inc. All rights reserved.
# Licensed under the BSD-style license. See LICENSE file in the project root for full license information.
AWSTemplateFormatVersion: '2010-09-09'
Description: CloudZero Provision Account CFN Templates
Parameters:
BucketName:
Type: String
Resources:
Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Ref BucketName
CorsConfiguration:
CorsRules:
- AllowedHeaders:
- '*'
AllowedMethods:
- GET
AllowedOrigins:
- '*'
ExposedHeaders:
- Content-Type
MaxAge: 3000
Policy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: !Ref Bucket
PolicyDocument:
Statement:
- Action:
- "s3:GetObject"
Effect: "Allow"
Resource:
- !Sub ${Bucket.Arn}
- !Sub '${Bucket.Arn}/*'
Principal: '*'
Outputs:
BucketName:
Value: !Ref Bucket
Description: CloudZero Provision Account CFN Templates Bucket Name
BucketArn:
Value: !GetAtt Bucket.Arn
Description: CloudZero Provision Account CFN Templates Bucket Arn