-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoved_state.tf
More file actions
253 lines (207 loc) · 8.27 KB
/
moved_state.tf
File metadata and controls
253 lines (207 loc) · 8.27 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# Handle state migration since the VPC module became conditional
# This ensures existing users don't destroy/create their VPC resources when upgrading
moved {
from = module.main_vpc
to = module.main_vpc[0]
}
# The services module is now conditional. Note that some resources were split out into the services-common module.
moved {
from = module.services
to = module.services[0]
}
# Brainstore S3 bucket moved from brainstore -> storage
moved {
from = module.brainstore[0].aws_s3_bucket.brainstore
to = module.storage.aws_s3_bucket.brainstore
}
moved {
from = module.brainstore[0].aws_s3_bucket_server_side_encryption_configuration.brainstore
to = module.storage.aws_s3_bucket_server_side_encryption_configuration.brainstore
}
moved {
from = module.brainstore[0].aws_s3_bucket_versioning.brainstore
to = module.storage.aws_s3_bucket_versioning.brainstore
}
moved {
from = module.brainstore[0].aws_s3_bucket_lifecycle_configuration.brainstore
to = module.storage.aws_s3_bucket_lifecycle_configuration.brainstore
}
moved {
from = module.brainstore[0].aws_s3_bucket_public_access_block.brainstore
to = module.storage.aws_s3_bucket_public_access_block.brainstore
}
# Code Bundle/Lambda Responses S3 buckets moved from services -> storage
moved {
from = module.services.aws_s3_bucket.code_bundle_bucket
to = module.storage.aws_s3_bucket.code_bundle_bucket
}
moved {
from = module.services.aws_s3_bucket_server_side_encryption_configuration.code_bundle_bucket
to = module.storage.aws_s3_bucket_server_side_encryption_configuration.code_bundle_bucket
}
moved {
from = module.services.aws_s3_bucket_cors_configuration.code_bundle_bucket
to = module.storage.aws_s3_bucket_cors_configuration.code_bundle_bucket
}
moved {
from = module.services.aws_s3_bucket_lifecycle_configuration.code_bundle_bucket
to = module.storage.aws_s3_bucket_lifecycle_configuration.code_bundle_bucket
}
moved {
from = module.services.aws_s3_bucket_public_access_block.code_bundle_bucket
to = module.storage.aws_s3_bucket_public_access_block.code_bundle_bucket
}
moved {
from = module.services.aws_s3_bucket_versioning.code_bundle_bucket
to = module.storage.aws_s3_bucket_versioning.code_bundle_bucket
}
moved {
from = module.services.aws_s3_bucket.lambda_responses_bucket
to = module.storage.aws_s3_bucket.lambda_responses_bucket
}
moved {
from = module.services.aws_s3_bucket_lifecycle_configuration.lambda_responses_bucket
to = module.storage.aws_s3_bucket_lifecycle_configuration.lambda_responses_bucket
}
moved {
from = module.services.aws_s3_bucket_cors_configuration.lambda_responses_bucket
to = module.storage.aws_s3_bucket_cors_configuration.lambda_responses_bucket
}
moved {
from = module.services.aws_s3_bucket_server_side_encryption_configuration.lambda_responses_bucket
to = module.storage.aws_s3_bucket_server_side_encryption_configuration.lambda_responses_bucket
}
moved {
from = module.services.aws_s3_bucket_public_access_block.lambda_responses_bucket
to = module.storage.aws_s3_bucket_public_access_block.lambda_responses_bucket
}
moved {
from = module.services.aws_s3_bucket_versioning.lambda_responses_bucket
to = module.storage.aws_s3_bucket_versioning.lambda_responses_bucket
}
# CloudFront and API Gateway resources moved from services -> ingress
moved {
from = module.services.aws_cloudfront_distribution.dataplane
to = module.ingress[0].aws_cloudfront_distribution.dataplane
}
moved {
from = module.services.aws_api_gateway_rest_api.api
to = module.ingress[0].aws_api_gateway_rest_api.api
}
moved {
from = module.services.aws_api_gateway_deployment.api
to = module.ingress[0].aws_api_gateway_deployment.api
}
moved {
from = module.services.aws_api_gateway_stage.api
to = module.ingress[0].aws_api_gateway_stage.api
}
moved {
from = module.services.aws_api_gateway_method_settings.all
to = module.ingress[0].aws_api_gateway_method_settings.all
}
moved {
from = module.services.aws_lambda_permission.api_gateway
to = module.ingress[0].aws_lambda_permission.api_gateway
}
# Brainstore IAM resources moved from brainstore -> services-common
moved {
from = module.brainstore[0].aws_iam_role.brainstore_ec2_role
to = module.services_common.aws_iam_role.brainstore_role
}
moved {
from = module.brainstore[0].aws_iam_role_policy.brainstore_s3_access
to = module.services_common.aws_iam_role_policy.brainstore_s3_access
}
moved {
from = module.brainstore[0].aws_iam_role_policy.brainstore_secrets_access
to = module.services_common.aws_iam_role_policy.brainstore_secrets_access
}
moved {
from = module.brainstore[0].aws_iam_role_policy.brainstore_cloudwatch_logs_access
to = module.services_common.aws_iam_role_policy.brainstore_cloudwatch_logs_access
}
moved {
from = module.brainstore[0].aws_iam_role_policy.brainstore_kms_policy
to = module.services_common.aws_iam_role_policy.brainstore_kms_policy
}
# Brainstore security group moved from brainstore -> services-common
moved {
from = module.brainstore[0].aws_security_group.brainstore_instance
to = module.services_common.aws_security_group.brainstore_instance
}
moved {
from = module.brainstore[0].aws_vpc_security_group_egress_rule.brainstore_instance_allow_egress_all
to = module.services_common.aws_vpc_security_group_egress_rule.brainstore_instance_allow_egress_all
}
# APIHandler IAM resources moved from services -> services-common
moved {
from = module.services.aws_iam_role.api_handler_role
to = module.services_common.aws_iam_role.api_handler_role
}
moved {
from = module.services.aws_iam_policy.api_handler_policy
to = module.services_common.aws_iam_policy.api_handler_policy
}
moved {
from = module.services.aws_iam_role_policy_attachment.api_handler_policy
to = module.services_common.aws_iam_role_policy_attachment.api_handler_policy
}
moved {
from = module.services.aws_iam_role_policy_attachment.api_handler_additional_policy
to = module.services_common.aws_iam_role_policy_attachment.api_handler_additional_policy
}
# Secrets from services -> services-common
moved {
from = module.services.aws_secretsmanager_secret.function_tools_secret
to = module.services_common.aws_secretsmanager_secret.function_tools_secret
}
moved {
from = module.services.aws_secretsmanager_secret_version.function_tools_secret
to = module.services_common.aws_secretsmanager_secret_version.function_tools_secret
}
# Database subnet group is now optional
moved {
from = module.database.aws_db_subnet_group.main
to = module.database.aws_db_subnet_group.main[0]
}
# Quarantine IAM resources moved from services -> services-common
# These IAM roles are no longer in 'services' they are in 'services-common'
moved {
from = module.services[0].aws_iam_role.quarantine_invoke_role
to = module.services_common.aws_iam_role.quarantine_invoke_role[0]
}
moved {
from = module.services[0].aws_iam_role_policy.quarantine_invoke_policy
to = module.services_common.aws_iam_role_policy.quarantine_invoke_policy[0]
}
moved {
from = module.services[0].aws_iam_role_policies_exclusive.quarantine_invoke_role
to = module.services_common.aws_iam_role_policies_exclusive.quarantine_invoke_role[0]
}
moved {
from = module.services[0].aws_iam_role.quarantine_function_role
to = module.services_common.aws_iam_role.quarantine_function_role[0]
}
moved {
from = module.services[0].aws_iam_role_policy_attachment.quarantine_function_role
to = module.services_common.aws_iam_role_policy_attachment.quarantine_function_role[0]
}
moved {
from = module.services[0].aws_iam_policy.api_handler_quarantine[0]
to = module.services_common.aws_iam_policy.api_handler_quarantine[0]
}
moved {
from = module.services[0].aws_iam_role_policy_attachment.api_handler_quarantine[0]
to = module.services_common.aws_iam_role_policy_attachment.api_handler_quarantine[0]
}
# Quarantine security group moved from services -> services-common
# This ensures the security group is available in both Lambda and EKS deployment modes
moved {
from = module.services[0].aws_security_group.quarantine_lambda[0]
to = module.services_common.aws_security_group.quarantine_lambda[0]
}
moved {
from = module.services[0].aws_security_group_rule.quarantine_lambda_allow_egress_all[0]
to = module.services_common.aws_security_group_rule.quarantine_lambda_allow_egress_all[0]
}