@@ -12,62 +12,95 @@ provider "aws" {
12
12
resource "random_pet" "this" {
13
13
length = 2
14
14
}
15
+ #
16
+ # module "lambda_function" {
17
+ # source = "../../"
18
+ #
19
+ # function_name = "${random_pet.this.id}-lambda"
20
+ # handler = "index.lambda_handler"
21
+ # runtime = "python3.8"
22
+ # publish = true
23
+ #
24
+ # source_path = "${path.module}/../fixtures/python3.8-app1"
25
+ # hash_extra = "yo"
26
+ #
27
+ # create_async_event_config = true
28
+ # maximum_event_age_in_seconds = 100
29
+ #
30
+ # provisioned_concurrent_executions = 1
31
+ #
32
+ # allowed_triggers = {
33
+ # APIGatewayAny = {
34
+ # service = "apigateway"
35
+ # arn = "arn:aws:execute-api:eu-west-1:135367859851:aqnku8akd0"
36
+ # }
37
+ # }
38
+ #
39
+ # # current version
40
+ # # create_current_version_async_event_config = false
41
+ # # create_current_version_triggers = false
42
+ #
43
+ # # unqualified alias
44
+ # # create_unqualified_alias_async_event_config = false
45
+ # # create_unqualified_alias_triggers = false
46
+ # }
47
+ #
48
+ # module "alias_no_refresh" {
49
+ # source = "../../modules/alias"
50
+ #
51
+ # create = true
52
+ # refresh_alias = false
53
+ #
54
+ # name = "current-no-refresh"
55
+ #
56
+ # function_name = module.lambda_function.this_lambda_function_name
57
+ # function_version = module.lambda_function.this_lambda_function_version
58
+ #
59
+ # # create_version_async_event_config = false
60
+ # # create_async_event_config = true
61
+ # # maximum_event_age_in_seconds = 130
62
+ #
63
+ # allowed_triggers = {
64
+ # AnotherAPIGatewayAny = { # keys should be unique
65
+ # service = "apigateway"
66
+ # arn = "arn:aws:execute-api:eu-west-1:135367859851:abcdedfgse"
67
+ # }
68
+ # }
69
+ #
70
+ # }
71
+ #
72
+ # module "alias_refresh" {
73
+ # source = "../../modules/alias"
74
+ #
75
+ # create = true
76
+ # refresh_alias = true
77
+ #
78
+ # name = "current-with-refresh"
79
+ #
80
+ # function_name = module.lambda_function.this_lambda_function_name
81
+ # }
82
+ #
83
+ # module "alias_existing" {
84
+ # source = "../../modules/alias"
85
+ #
86
+ # create = true
87
+ # use_existing_alias = true
88
+ #
89
+ # name = module.alias_refresh.this_lambda_alias_name
90
+ # function_name = module.lambda_function.this_lambda_function_name
91
+ #
92
+ # create_async_event_config = true
93
+ # maximum_event_age_in_seconds = 100
94
+ #
95
+ # allowed_triggers = {
96
+ # ThirdAPIGatewayAny = {
97
+ # service = "apigateway"
98
+ # arn = "arn:aws:execute-api:eu-west-1:135367859851:aqnku8akd0"
99
+ # }
100
+ # }
101
+ #
102
+ # }
15
103
16
- module "lambda_function" {
17
- source = " ../../"
18
-
19
- function_name = " ${ random_pet . this . id } -lambda"
20
- handler = " index.lambda_handler"
21
- runtime = " python3.8"
22
- publish = true
23
-
24
- source_path = " ${ path . module } /../fixtures/python3.8-app1"
25
- hash_extra = " yo"
26
-
27
- create_async_event_config = true
28
- maximum_event_age_in_seconds = 100
29
-
30
- provisioned_concurrent_executions = 1
31
-
32
- allowed_triggers = {
33
- APIGatewayAny = {
34
- service = " apigateway"
35
- arn = " arn:aws:execute-api:eu-west-1:135367859851:aqnku8akd0"
36
- }
37
- }
38
-
39
- // current version
40
- // create_current_version_async_event_config = false
41
- // create_current_version_triggers = false
42
-
43
- // unqualified alias
44
- // create_unqualified_alias_async_event_config = false
45
- // create_unqualified_alias_triggers = false
46
- }
47
-
48
- module "alias_no_refresh" {
49
- source = " ../../modules/alias"
50
-
51
- create = true
52
- refresh_alias = false
53
-
54
- name = " current-no-refresh"
55
-
56
- function_name = module. lambda_function . this_lambda_function_name
57
- function_version = module. lambda_function . this_lambda_function_version
58
-
59
- // create_version_async_event_config = false
60
- // create_async_event_config = true
61
- // maximum_event_age_in_seconds = 130
62
-
63
- allowed_triggers = {
64
- AnotherAPIGatewayAny = { // keys should be unique
65
- service = " apigateway"
66
- arn = " arn:aws:execute-api:eu-west-1:135367859851:abcdedfgse"
67
- }
68
- }
69
-
70
- }
71
104
72
105
module "alias_refresh" {
73
106
source = " ../../modules/alias"
@@ -79,24 +112,3 @@ module "alias_refresh" {
79
112
80
113
function_name = module. lambda_function . this_lambda_function_name
81
114
}
82
-
83
- module "alias_existing" {
84
- source = " ../../modules/alias"
85
-
86
- create = true
87
- use_existing_alias = true
88
-
89
- name = module. alias_refresh . this_lambda_alias_name
90
- function_name = module. lambda_function . this_lambda_function_name
91
-
92
- create_async_event_config = true
93
- maximum_event_age_in_seconds = 100
94
-
95
- allowed_triggers = {
96
- ThirdAPIGatewayAny = {
97
- service = " apigateway"
98
- arn = " arn:aws:execute-api:eu-west-1:135367859851:aqnku8akd0"
99
- }
100
- }
101
-
102
- }
0 commit comments