|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
3 |
| -exports[`Test deployment w/ existing secret 1`] = ` |
4 |
| -Object { |
5 |
| - "Parameters": Object { |
6 |
| - "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8ArtifactHash8D9AD644": Object { |
7 |
| - "Description": "Artifact hash for asset \\"0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8\\"", |
8 |
| - "Type": "String", |
9 |
| - }, |
10 |
| - "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3Bucket9E1964CB": Object { |
11 |
| - "Description": "S3 bucket for asset \\"0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8\\"", |
12 |
| - "Type": "String", |
13 |
| - }, |
14 |
| - "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3VersionKey7153CEE7": Object { |
15 |
| - "Description": "S3 key for asset version \\"0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8\\"", |
16 |
| - "Type": "String", |
17 |
| - }, |
18 |
| - }, |
19 |
| - "Resources": Object { |
20 |
| - "lambdatosecretsmanagerstackLambdaFunction2BCCE9C9": Object { |
21 |
| - "DependsOn": Array [ |
22 |
| - "lambdatosecretsmanagerstackLambdaFunctionServiceRoleDefaultPolicy8E30EE71", |
23 |
| - "lambdatosecretsmanagerstackLambdaFunctionServiceRole035B2C55", |
24 |
| - ], |
25 |
| - "Metadata": Object { |
26 |
| - "cfn_nag": Object { |
27 |
| - "rules_to_suppress": Array [ |
28 |
| - Object { |
29 |
| - "id": "W58", |
30 |
| - "reason": "Lambda functions has the required permission to write CloudWatch Logs. It uses custom policy instead of arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole with tighter permissions.", |
31 |
| - }, |
32 |
| - Object { |
33 |
| - "id": "W89", |
34 |
| - "reason": "This is not a rule for the general case, just for specific use cases/industries", |
35 |
| - }, |
36 |
| - Object { |
37 |
| - "id": "W92", |
38 |
| - "reason": "Impossible for us to define the correct concurrency for clients", |
39 |
| - }, |
40 |
| - ], |
41 |
| - }, |
42 |
| - }, |
43 |
| - "Properties": Object { |
44 |
| - "Code": Object { |
45 |
| - "S3Bucket": Object { |
46 |
| - "Ref": "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3Bucket9E1964CB", |
47 |
| - }, |
48 |
| - "S3Key": Object { |
49 |
| - "Fn::Join": Array [ |
50 |
| - "", |
51 |
| - Array [ |
52 |
| - Object { |
53 |
| - "Fn::Select": Array [ |
54 |
| - 0, |
55 |
| - Object { |
56 |
| - "Fn::Split": Array [ |
57 |
| - "||", |
58 |
| - Object { |
59 |
| - "Ref": "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3VersionKey7153CEE7", |
60 |
| - }, |
61 |
| - ], |
62 |
| - }, |
63 |
| - ], |
64 |
| - }, |
65 |
| - Object { |
66 |
| - "Fn::Select": Array [ |
67 |
| - 1, |
68 |
| - Object { |
69 |
| - "Fn::Split": Array [ |
70 |
| - "||", |
71 |
| - Object { |
72 |
| - "Ref": "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3VersionKey7153CEE7", |
73 |
| - }, |
74 |
| - ], |
75 |
| - }, |
76 |
| - ], |
77 |
| - }, |
78 |
| - ], |
79 |
| - ], |
80 |
| - }, |
81 |
| - }, |
82 |
| - "Environment": Object { |
83 |
| - "Variables": Object { |
84 |
| - "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", |
85 |
| - "SECRET_NAME": Object { |
86 |
| - "Fn::Select": Array [ |
87 |
| - 6, |
88 |
| - Object { |
89 |
| - "Fn::Split": Array [ |
90 |
| - ":", |
91 |
| - Object { |
92 |
| - "Ref": "secret4DA88516", |
93 |
| - }, |
94 |
| - ], |
95 |
| - }, |
96 |
| - ], |
97 |
| - }, |
98 |
| - }, |
99 |
| - }, |
100 |
| - "Handler": "index.handler", |
101 |
| - "Role": Object { |
102 |
| - "Fn::GetAtt": Array [ |
103 |
| - "lambdatosecretsmanagerstackLambdaFunctionServiceRole035B2C55", |
104 |
| - "Arn", |
105 |
| - ], |
106 |
| - }, |
107 |
| - "Runtime": "nodejs10.x", |
108 |
| - "TracingConfig": Object { |
109 |
| - "Mode": "Active", |
110 |
| - }, |
111 |
| - }, |
112 |
| - "Type": "AWS::Lambda::Function", |
113 |
| - }, |
114 |
| - "lambdatosecretsmanagerstackLambdaFunctionServiceRole035B2C55": Object { |
115 |
| - "Properties": Object { |
116 |
| - "AssumeRolePolicyDocument": Object { |
117 |
| - "Statement": Array [ |
118 |
| - Object { |
119 |
| - "Action": "sts:AssumeRole", |
120 |
| - "Effect": "Allow", |
121 |
| - "Principal": Object { |
122 |
| - "Service": "lambda.amazonaws.com", |
123 |
| - }, |
124 |
| - }, |
125 |
| - ], |
126 |
| - "Version": "2012-10-17", |
127 |
| - }, |
128 |
| - "Policies": Array [ |
129 |
| - Object { |
130 |
| - "PolicyDocument": Object { |
131 |
| - "Statement": Array [ |
132 |
| - Object { |
133 |
| - "Action": Array [ |
134 |
| - "logs:CreateLogGroup", |
135 |
| - "logs:CreateLogStream", |
136 |
| - "logs:PutLogEvents", |
137 |
| - ], |
138 |
| - "Effect": "Allow", |
139 |
| - "Resource": Object { |
140 |
| - "Fn::Join": Array [ |
141 |
| - "", |
142 |
| - Array [ |
143 |
| - "arn:", |
144 |
| - Object { |
145 |
| - "Ref": "AWS::Partition", |
146 |
| - }, |
147 |
| - ":logs:", |
148 |
| - Object { |
149 |
| - "Ref": "AWS::Region", |
150 |
| - }, |
151 |
| - ":", |
152 |
| - Object { |
153 |
| - "Ref": "AWS::AccountId", |
154 |
| - }, |
155 |
| - ":log-group:/aws/lambda/*", |
156 |
| - ], |
157 |
| - ], |
158 |
| - }, |
159 |
| - }, |
160 |
| - ], |
161 |
| - "Version": "2012-10-17", |
162 |
| - }, |
163 |
| - "PolicyName": "LambdaFunctionServiceRolePolicy", |
164 |
| - }, |
165 |
| - ], |
166 |
| - }, |
167 |
| - "Type": "AWS::IAM::Role", |
168 |
| - }, |
169 |
| - "lambdatosecretsmanagerstackLambdaFunctionServiceRoleDefaultPolicy8E30EE71": Object { |
170 |
| - "Metadata": Object { |
171 |
| - "cfn_nag": Object { |
172 |
| - "rules_to_suppress": Array [ |
173 |
| - Object { |
174 |
| - "id": "W12", |
175 |
| - "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC.", |
176 |
| - }, |
177 |
| - ], |
178 |
| - }, |
179 |
| - }, |
180 |
| - "Properties": Object { |
181 |
| - "PolicyDocument": Object { |
182 |
| - "Statement": Array [ |
183 |
| - Object { |
184 |
| - "Action": Array [ |
185 |
| - "xray:PutTraceSegments", |
186 |
| - "xray:PutTelemetryRecords", |
187 |
| - ], |
188 |
| - "Effect": "Allow", |
189 |
| - "Resource": "*", |
190 |
| - }, |
191 |
| - Object { |
192 |
| - "Action": Array [ |
193 |
| - "secretsmanager:GetSecretValue", |
194 |
| - "secretsmanager:DescribeSecret", |
195 |
| - ], |
196 |
| - "Effect": "Allow", |
197 |
| - "Resource": Object { |
198 |
| - "Ref": "secret4DA88516", |
199 |
| - }, |
200 |
| - }, |
201 |
| - ], |
202 |
| - "Version": "2012-10-17", |
203 |
| - }, |
204 |
| - "PolicyName": "lambdatosecretsmanagerstackLambdaFunctionServiceRoleDefaultPolicy8E30EE71", |
205 |
| - "Roles": Array [ |
206 |
| - Object { |
207 |
| - "Ref": "lambdatosecretsmanagerstackLambdaFunctionServiceRole035B2C55", |
208 |
| - }, |
209 |
| - ], |
210 |
| - }, |
211 |
| - "Type": "AWS::IAM::Policy", |
212 |
| - }, |
213 |
| - "secret4DA88516": Object { |
214 |
| - "Properties": Object { |
215 |
| - "GenerateSecretString": Object {}, |
216 |
| - }, |
217 |
| - "Type": "AWS::SecretsManager::Secret", |
218 |
| - }, |
219 |
| - }, |
220 |
| -} |
221 |
| -`; |
222 |
| - |
223 | 3 | exports[`Test minimal deployment with new Lambda function 1`] = `
|
224 | 4 | Object {
|
225 | 5 | "Parameters": Object {
|
|
0 commit comments