Skip to content

Commit e75756c

Browse files
committed
fixed tests
1 parent 5d612b7 commit e75756c

12 files changed

+841
-1014
lines changed

test/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM python:3-alpine
22
COPY requirements.txt .
33

4-
ENV TERRAFORM_VERSION=0.12.18
4+
ENV TERRAFORM_VERSION=0.13.7
55
ENV TERRAFORM_ZIP=terraform_${TERRAFORM_VERSION}_linux_amd64.zip
6-
ENV TERRAFORM_SUM=e7ebe3ca988768bffe0c239d107645bd53515354cff6cbe5651718195a151700
6+
ENV TERRAFORM_SUM=4a52886e019b4fdad2439da5ff43388bbcc6cce9784fde32c53dcd0e28ca9957
77

88
RUN apk add -U ca-certificates curl && \
99
cd /tmp && \

test/files/create_lambda.json

Lines changed: 133 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,133 @@
1-
{
2-
"resource_changes": [
3-
{
4-
"address": "module.lambda.aws_cloudwatch_log_group.lambda_loggroup",
5-
"module_address": "module.lambda",
6-
"mode": "managed",
7-
"type": "aws_cloudwatch_log_group",
8-
"name": "lambda_loggroup",
9-
"provider_name": "aws",
10-
"change": {
11-
"actions": [
12-
"create"
13-
],
14-
"before": null,
15-
"after": {
16-
"kms_key_id": null,
17-
"name": "/aws/lambda/check_lambda_function",
18-
"name_prefix": null,
19-
"retention_in_days": 7,
20-
"tags": null
21-
},
22-
"after_unknown": {
23-
"arn": true,
24-
"id": true
25-
}
26-
}
27-
},
28-
{
29-
"address": "module.lambda.aws_iam_role.iam_for_lambda",
30-
"module_address": "module.lambda",
31-
"mode": "managed",
32-
"type": "aws_iam_role",
33-
"name": "iam_for_lambda",
34-
"provider_name": "aws",
35-
"change": {
36-
"actions": [
37-
"create"
38-
],
39-
"before": null,
40-
"after": {
41-
"assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\"\n }\n ]\n}\n",
42-
"description": null,
43-
"force_detach_policies": false,
44-
"max_session_duration": 3600,
45-
"name_prefix": "check_lambda_function",
46-
"path": "/",
47-
"permissions_boundary": null,
48-
"tags": null
49-
},
50-
"after_unknown": {
51-
"arn": true,
52-
"create_date": true,
53-
"id": true,
54-
"inline_policy": true,
55-
"managed_policy_arns": true,
56-
"name": true,
57-
"unique_id": true
58-
}
59-
}
60-
},
61-
{
62-
"address": "module.lambda.aws_iam_role_policy.lambda_policy",
63-
"module_address": "module.lambda",
64-
"mode": "managed",
65-
"type": "aws_iam_role_policy",
66-
"name": "lambda_policy",
67-
"provider_name": "aws",
68-
"change": {
69-
"actions": [
70-
"create"
71-
],
72-
"before": null,
73-
"after": {
74-
"name": "policy",
75-
"name_prefix": null,
76-
"policy": "{\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": [\n \"logs:CreateLogGroup\",\n \"logs:CreateLogStream\",\n \"logs:PutLogEvents\"\n ],\n \"Resource\": \"arn:aws:logs:*:*:*\"\n }\n ]\n}\n"
77-
},
78-
"after_unknown": {
79-
"id": true,
80-
"role": true
81-
}
82-
}
83-
},
84-
{
85-
"address": "module.lambda.aws_lambda_function.lambda_function",
86-
"module_address": "module.lambda",
87-
"mode": "managed",
88-
"type": "aws_lambda_function",
89-
"name": "lambda_function",
90-
"provider_name": "aws",
91-
"change": {
92-
"actions": [
93-
"create"
94-
],
95-
"before": null,
96-
"after": {
97-
"code_signing_config_arn": null,
98-
"dead_letter_config": [],
99-
"description": null,
100-
"environment": [
101-
{
102-
"variables": null
103-
}
104-
],
105-
"file_system_config": [],
106-
"filename": null,
107-
"function_name": "check_lambda_function",
108-
"handler": "some_handler",
109-
"image_config": [],
110-
"image_uri": null,
111-
"kms_key_arn": null,
112-
"layers": [],
113-
"memory_size": 128,
114-
"package_type": "Zip",
115-
"publish": false,
116-
"reserved_concurrent_executions": -1,
117-
"runtime": "python3.7",
118-
"s3_bucket": "cdflow-lambda-releases",
119-
"s3_key": "s3key.zip",
120-
"s3_object_version": null,
121-
"tags": null,
122-
"timeout": 3,
123-
"timeouts": null,
124-
"vpc_config": [
125-
{
126-
"security_group_ids": null,
127-
"subnet_ids": null
128-
}
129-
]
130-
},
131-
"after_unknown": {
132-
"arn": true,
133-
"dead_letter_config": [],
134-
"environment": [
135-
{}
136-
],
137-
"file_system_config": [],
138-
"id": true,
139-
"image_config": [],
140-
"invoke_arn": true,
141-
"last_modified": true,
142-
"layers": [],
143-
"qualified_arn": true,
144-
"role": true,
145-
"signing_job_arn": true,
146-
"signing_profile_version_arn": true,
147-
"source_code_hash": true,
148-
"source_code_size": true,
149-
"tracing_config": true,
150-
"version": true,
151-
"vpc_config": [
152-
{
153-
"vpc_id": true
154-
}
155-
]
156-
}
157-
}
158-
}
159-
]
160-
}
1+
[
2+
{
3+
"address": "module.lambda.aws_cloudwatch_log_group.lambda_loggroup",
4+
"module_address": "module.lambda",
5+
"mode": "managed",
6+
"type": "aws_cloudwatch_log_group",
7+
"name": "lambda_loggroup",
8+
"provider_name": "registry.terraform.io/hashicorp/aws",
9+
"change": {
10+
"actions": ["create"],
11+
"before": null,
12+
"after": {
13+
"kms_key_id": null,
14+
"name": "/aws/lambda/check_lambda_function",
15+
"name_prefix": null,
16+
"retention_in_days": 7,
17+
"tags": null
18+
},
19+
"after_unknown": { "arn": true, "id": true, "tags_all": true }
20+
}
21+
},
22+
{
23+
"address": "module.lambda.aws_iam_role.iam_for_lambda",
24+
"module_address": "module.lambda",
25+
"mode": "managed",
26+
"type": "aws_iam_role",
27+
"name": "iam_for_lambda",
28+
"provider_name": "registry.terraform.io/hashicorp/aws",
29+
"change": {
30+
"actions": ["create"],
31+
"before": null,
32+
"after": {
33+
"assume_role_policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n },\n \"Effect\": \"Allow\"\n }\n ]\n}\n",
34+
"description": null,
35+
"force_detach_policies": false,
36+
"max_session_duration": 3600,
37+
"name_prefix": "check_lambda_function",
38+
"path": "/",
39+
"permissions_boundary": null,
40+
"tags": null
41+
},
42+
"after_unknown": {
43+
"arn": true,
44+
"create_date": true,
45+
"id": true,
46+
"inline_policy": true,
47+
"managed_policy_arns": true,
48+
"name": true,
49+
"tags_all": true,
50+
"unique_id": true
51+
}
52+
}
53+
},
54+
{
55+
"address": "module.lambda.aws_iam_role_policy.lambda_policy",
56+
"module_address": "module.lambda",
57+
"mode": "managed",
58+
"type": "aws_iam_role_policy",
59+
"name": "lambda_policy",
60+
"provider_name": "registry.terraform.io/hashicorp/aws",
61+
"change": {
62+
"actions": ["create"],
63+
"before": null,
64+
"after": {
65+
"name": "policy",
66+
"name_prefix": null,
67+
"policy": "{\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": [\n \"logs:CreateLogGroup\",\n \"logs:CreateLogStream\",\n \"logs:PutLogEvents\"\n ],\n \"Resource\": \"arn:aws:logs:*:*:*\"\n }\n ]\n}\n"
68+
},
69+
"after_unknown": { "id": true, "role": true }
70+
}
71+
},
72+
{
73+
"address": "module.lambda.aws_lambda_function.lambda_function",
74+
"module_address": "module.lambda",
75+
"mode": "managed",
76+
"type": "aws_lambda_function",
77+
"name": "lambda_function",
78+
"provider_name": "registry.terraform.io/hashicorp/aws",
79+
"change": {
80+
"actions": ["create"],
81+
"before": null,
82+
"after": {
83+
"architectures": ["x86_64"],
84+
"code_signing_config_arn": null,
85+
"dead_letter_config": [],
86+
"description": null,
87+
"environment": [{ "variables": null }],
88+
"file_system_config": [],
89+
"filename": null,
90+
"function_name": "check_lambda_function",
91+
"handler": "some_handler",
92+
"image_config": [],
93+
"image_uri": null,
94+
"kms_key_arn": null,
95+
"layers": [],
96+
"memory_size": 128,
97+
"package_type": "Zip",
98+
"publish": false,
99+
"reserved_concurrent_executions": -1,
100+
"runtime": "python3.7",
101+
"s3_bucket": "cdflow-lambda-releases",
102+
"s3_key": "s3key.zip",
103+
"s3_object_version": null,
104+
"tags": null,
105+
"timeout": 3,
106+
"timeouts": null,
107+
"vpc_config": [{ "security_group_ids": null, "subnet_ids": null }]
108+
},
109+
"after_unknown": {
110+
"architectures": [false],
111+
"arn": true,
112+
"dead_letter_config": [],
113+
"environment": [{}],
114+
"file_system_config": [],
115+
"id": true,
116+
"image_config": [],
117+
"invoke_arn": true,
118+
"last_modified": true,
119+
"layers": [],
120+
"qualified_arn": true,
121+
"role": true,
122+
"signing_job_arn": true,
123+
"signing_profile_version_arn": true,
124+
"source_code_hash": true,
125+
"source_code_size": true,
126+
"tags_all": true,
127+
"tracing_config": true,
128+
"version": true,
129+
"vpc_config": [{ "vpc_id": true }]
130+
}
131+
}
132+
}
133+
]

0 commit comments

Comments
 (0)