|
1 |
| -provider "aws" { |
2 |
| - region = "eu-west-1" |
| 1 | +# provider "aws" { |
| 2 | +# region = "eu-west-1" |
3 | 3 |
|
4 |
| - # Make it faster by skipping something |
5 |
| - skip_metadata_api_check = true |
6 |
| - skip_region_validation = true |
7 |
| - skip_credentials_validation = true |
8 |
| -} |
| 4 | +# # Make it faster by skipping something |
| 5 | +# skip_metadata_api_check = true |
| 6 | +# skip_region_validation = true |
| 7 | +# skip_credentials_validation = true |
| 8 | +# } |
9 | 9 |
|
10 |
| -data "aws_organizations_organization" "this" {} |
| 10 | +# data "aws_organizations_organization" "this" {} |
11 | 11 |
|
12 |
| -resource "random_pet" "this" { |
13 |
| - length = 2 |
14 |
| -} |
| 12 | +# resource "random_pet" "this" { |
| 13 | +# length = 2 |
| 14 | +# } |
15 | 15 |
|
16 |
| -module "sqs_events" { |
17 |
| - source = "terraform-aws-modules/sqs/aws" |
18 |
| - version = "~> 3.0" |
| 16 | +# module "sqs_events" { |
| 17 | +# source = "terraform-aws-modules/sqs/aws" |
| 18 | +# version = "~> 3.0" |
19 | 19 |
|
20 |
| - name = "${random_pet.this.id}-events" |
21 |
| -} |
| 20 | +# name = "${random_pet.this.id}-events" |
| 21 | +# } |
22 | 22 |
|
23 |
| -module "lambda_function" { |
24 |
| - source = "../../" |
| 23 | +# module "lambda_function" { |
| 24 | +# source = "../../" |
25 | 25 |
|
26 |
| - function_name = "${random_pet.this.id}-lambda" |
27 |
| - handler = "index.lambda_handler" |
28 |
| - runtime = "python3.12" |
29 |
| - publish = true |
30 |
| - |
31 |
| - source_path = "${path.module}/../fixtures/python-app1" |
32 |
| - hash_extra = "yo" |
33 |
| - |
34 |
| - create_async_event_config = true |
35 |
| - maximum_event_age_in_seconds = 100 |
36 |
| - |
37 |
| - attach_policies = true |
38 |
| - policies = [ |
39 |
| - "arn:aws:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole", |
40 |
| - ] |
41 |
| - number_of_policies = 1 |
42 |
| - |
43 |
| - allowed_triggers = { |
44 |
| - APIGatewayAny = { |
45 |
| - service = "apigateway" |
46 |
| - source_arn = "arn:aws:execute-api:eu-west-1:135367859851:aqnku8akd0/*/*/*" |
47 |
| - } |
48 |
| - } |
49 |
| - |
50 |
| - # current version |
51 |
| - # create_current_version_async_event_config = false |
52 |
| - # create_current_version_triggers = false |
53 |
| - |
54 |
| - # unqualified alias |
55 |
| - # create_unqualified_alias_async_event_config = false |
56 |
| - # create_unqualified_alias_triggers = false |
57 |
| -} |
58 |
| - |
59 |
| -module "alias_no_refresh" { |
60 |
| - source = "../../modules/alias" |
61 |
| - |
62 |
| - create = true |
63 |
| - refresh_alias = false |
64 |
| - |
65 |
| - name = "current-no-refresh" |
66 |
| - |
67 |
| - function_name = module.lambda_function.lambda_function_name |
68 |
| - function_version = module.lambda_function.lambda_function_version |
69 |
| - |
70 |
| - # create_version_async_event_config = false |
71 |
| - # create_async_event_config = true |
72 |
| - # maximum_event_age_in_seconds = 130 |
73 |
| - |
74 |
| - event_source_mapping = { |
75 |
| - sqs = { |
76 |
| - service = "sqs" |
77 |
| - event_source_arn = module.sqs_events.sqs_queue_arn |
78 |
| - maximum_concurrency = 10 |
79 |
| - } |
80 |
| - } |
81 |
| - |
82 |
| - allowed_triggers = { |
83 |
| - Config = { |
84 |
| - principal = "config.amazonaws.com" |
85 |
| - principal_org_id = data.aws_organizations_organization.this.id |
86 |
| - } |
87 |
| - AnotherAPIGatewayAny = { # keys should be unique |
88 |
| - service = "apigateway" |
89 |
| - source_arn = "arn:aws:execute-api:eu-west-1:135367859851:abcdedfgse/*/*/*" |
90 |
| - } |
91 |
| - } |
92 |
| - |
93 |
| -} |
94 |
| - |
95 |
| -module "alias_refresh" { |
96 |
| - source = "../../modules/alias" |
97 |
| - |
98 |
| - create = true |
99 |
| - refresh_alias = true |
100 |
| - |
101 |
| - name = "current-with-refresh" |
102 |
| - |
103 |
| - function_name = module.lambda_function.lambda_function_name |
104 |
| -} |
105 |
| - |
106 |
| -module "alias_existing" { |
107 |
| - source = "../../modules/alias" |
108 |
| - |
109 |
| - create = true |
110 |
| - use_existing_alias = true |
111 |
| - |
112 |
| - name = module.alias_refresh.lambda_alias_name |
113 |
| - function_name = module.lambda_function.lambda_function_name |
114 |
| - |
115 |
| - create_async_event_config = true |
116 |
| - maximum_event_age_in_seconds = 100 |
117 |
| - |
118 |
| - event_source_mapping = { |
119 |
| - sqs = { |
120 |
| - service = "sqs" |
121 |
| - event_source_arn = module.sqs_events.sqs_queue_arn |
122 |
| - } |
123 |
| - } |
124 |
| - |
125 |
| - allowed_triggers = { |
126 |
| - Config = { |
127 |
| - principal = "config.amazonaws.com" |
128 |
| - principal_org_id = data.aws_organizations_organization.this.id |
129 |
| - } |
130 |
| - ThirdAPIGatewayAny = { |
131 |
| - service = "apigateway" |
132 |
| - source_arn = "arn:aws:execute-api:eu-west-1:135367859851:aqnku8akd0/*/*/*" |
133 |
| - } |
134 |
| - } |
135 |
| - |
136 |
| -} |
| 26 | +# function_name = "${random_pet.this.id}-lambda" |
| 27 | +# handler = "index.lambda_handler" |
| 28 | +# runtime = "python3.12" |
| 29 | +# publish = true |
| 30 | + |
| 31 | +# source_path = "${path.module}/../fixtures/python-app1" |
| 32 | +# hash_extra = "yo" |
| 33 | + |
| 34 | +# create_async_event_config = true |
| 35 | +# maximum_event_age_in_seconds = 100 |
| 36 | + |
| 37 | +# attach_policies = true |
| 38 | +# policies = [ |
| 39 | +# "arn:aws:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole", |
| 40 | +# ] |
| 41 | +# number_of_policies = 1 |
| 42 | + |
| 43 | +# allowed_triggers = { |
| 44 | +# APIGatewayAny = { |
| 45 | +# service = "apigateway" |
| 46 | +# source_arn = "arn:aws:execute-api:eu-west-1:135367859851:aqnku8akd0/*/*/*" |
| 47 | +# } |
| 48 | +# } |
| 49 | + |
| 50 | +# # current version |
| 51 | +# # create_current_version_async_event_config = false |
| 52 | +# # create_current_version_triggers = false |
| 53 | + |
| 54 | +# # unqualified alias |
| 55 | +# # create_unqualified_alias_async_event_config = false |
| 56 | +# # create_unqualified_alias_triggers = false |
| 57 | +# } |
| 58 | + |
| 59 | +# module "alias_no_refresh" { |
| 60 | +# source = "../../modules/alias" |
| 61 | + |
| 62 | +# create = true |
| 63 | +# refresh_alias = false |
| 64 | + |
| 65 | +# name = "current-no-refresh" |
| 66 | + |
| 67 | +# function_name = module.lambda_function.lambda_function_name |
| 68 | +# function_version = module.lambda_function.lambda_function_version |
| 69 | + |
| 70 | +# # create_version_async_event_config = false |
| 71 | +# # create_async_event_config = true |
| 72 | +# # maximum_event_age_in_seconds = 130 |
| 73 | + |
| 74 | +# event_source_mapping = { |
| 75 | +# sqs = { |
| 76 | +# service = "sqs" |
| 77 | +# event_source_arn = module.sqs_events.sqs_queue_arn |
| 78 | +# maximum_concurrency = 10 |
| 79 | +# } |
| 80 | +# } |
| 81 | + |
| 82 | +# allowed_triggers = { |
| 83 | +# Config = { |
| 84 | +# principal = "config.amazonaws.com" |
| 85 | +# principal_org_id = data.aws_organizations_organization.this.id |
| 86 | +# } |
| 87 | +# AnotherAPIGatewayAny = { # keys should be unique |
| 88 | +# service = "apigateway" |
| 89 | +# source_arn = "arn:aws:execute-api:eu-west-1:135367859851:abcdedfgse/*/*/*" |
| 90 | +# } |
| 91 | +# } |
| 92 | + |
| 93 | +# } |
| 94 | + |
| 95 | +# module "alias_refresh" { |
| 96 | +# source = "../../modules/alias" |
| 97 | + |
| 98 | +# create = true |
| 99 | +# refresh_alias = true |
| 100 | + |
| 101 | +# name = "current-with-refresh" |
| 102 | + |
| 103 | +# function_name = module.lambda_function.lambda_function_name |
| 104 | +# } |
| 105 | + |
| 106 | +# module "alias_existing" { |
| 107 | +# source = "../../modules/alias" |
| 108 | + |
| 109 | +# create = true |
| 110 | +# use_existing_alias = true |
| 111 | + |
| 112 | +# name = module.alias_refresh.lambda_alias_name |
| 113 | +# function_name = module.lambda_function.lambda_function_name |
| 114 | + |
| 115 | +# create_async_event_config = true |
| 116 | +# maximum_event_age_in_seconds = 100 |
| 117 | + |
| 118 | +# event_source_mapping = { |
| 119 | +# sqs = { |
| 120 | +# service = "sqs" |
| 121 | +# event_source_arn = module.sqs_events.sqs_queue_arn |
| 122 | +# } |
| 123 | +# } |
| 124 | + |
| 125 | +# allowed_triggers = { |
| 126 | +# Config = { |
| 127 | +# principal = "config.amazonaws.com" |
| 128 | +# principal_org_id = data.aws_organizations_organization.this.id |
| 129 | +# } |
| 130 | +# ThirdAPIGatewayAny = { |
| 131 | +# service = "apigateway" |
| 132 | +# source_arn = "arn:aws:execute-api:eu-west-1:135367859851:aqnku8akd0/*/*/*" |
| 133 | +# } |
| 134 | +# } |
| 135 | + |
| 136 | +# } |
0 commit comments