-
Notifications
You must be signed in to change notification settings - Fork 0
/
cf-hypnos-spoke.yml
46 lines (41 loc) · 1.24 KB
/
cf-hypnos-spoke.yml
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
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Stack providing cross account access
Parameters:
CentralHypnosAccount:
Description: Corporate AWS account ID
Type: String
ConstraintDescription: Must be a valid AWS account ID
Resources:
HypnosManageInstancesRole:
Type: AWS::IAM::Role
Properties:
RoleName: hypnos-manage-instances
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
AWS: !Sub 'arn:aws:iam::${CentralHypnosAccount}:root'
Action:
- sts:AssumeRole
Path: "/"
Policies:
- PolicyName: hypnos-start-stop-instances
PolicyDocument:
Statement:
- Effect: Allow
Action:
- ec2:DescribeInstances
- ec2:TerminateInstances
- ec2:StartInstances
- ec2:StopInstances
- autoscaling:ResumeProcesses
- autoscaling:DescribeAutoScalingGroups
- autoscaling:SuspendProcesses
- autoscaling:TerminateInstanceInAutoScalingGroup
- rds:DescribeDBClusters
- rds:ListTagsForResource
- rds:StartDBCluster
- rds:StopDBCluster
Resource:
- '*'