terraformgraph 1.0.2__py3-none-any.whl → 1.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- terraformgraph/__init__.py +1 -1
- terraformgraph/__main__.py +1 -1
- terraformgraph/aggregator.py +941 -300
- terraformgraph/config/aggregation_rules.yaml +276 -1
- terraformgraph/config_loader.py +9 -8
- terraformgraph/icons.py +504 -521
- terraformgraph/layout.py +580 -116
- terraformgraph/main.py +251 -48
- terraformgraph/parser.py +328 -86
- terraformgraph/renderer.py +1887 -170
- terraformgraph/terraform_tools.py +355 -0
- terraformgraph/variable_resolver.py +180 -0
- terraformgraph-1.0.4.dist-info/METADATA +386 -0
- terraformgraph-1.0.4.dist-info/RECORD +19 -0
- {terraformgraph-1.0.2.dist-info → terraformgraph-1.0.4.dist-info}/licenses/LICENSE +1 -1
- terraformgraph-1.0.2.dist-info/METADATA +0 -163
- terraformgraph-1.0.2.dist-info/RECORD +0 -17
- {terraformgraph-1.0.2.dist-info → terraformgraph-1.0.4.dist-info}/WHEEL +0 -0
- {terraformgraph-1.0.2.dist-info → terraformgraph-1.0.4.dist-info}/entry_points.txt +0 -0
- {terraformgraph-1.0.2.dist-info → terraformgraph-1.0.4.dist-info}/top_level.txt +0 -0
|
@@ -20,7 +20,17 @@ networking:
|
|
|
20
20
|
|
|
21
21
|
vpc:
|
|
22
22
|
primary: ["aws_vpc"]
|
|
23
|
-
secondary: ["aws_subnet", "aws_route_table", "
|
|
23
|
+
secondary: ["aws_subnet", "aws_route_table", "aws_route_table_association"]
|
|
24
|
+
in_vpc: true
|
|
25
|
+
|
|
26
|
+
internet_gateway:
|
|
27
|
+
primary: ["aws_internet_gateway"]
|
|
28
|
+
secondary: []
|
|
29
|
+
in_vpc: true
|
|
30
|
+
|
|
31
|
+
nat_gateway:
|
|
32
|
+
primary: ["aws_nat_gateway"]
|
|
33
|
+
secondary: ["aws_eip"]
|
|
24
34
|
in_vpc: true
|
|
25
35
|
|
|
26
36
|
security_groups:
|
|
@@ -130,3 +140,268 @@ serverless:
|
|
|
130
140
|
primary: ["aws_sfn_state_machine"]
|
|
131
141
|
secondary: []
|
|
132
142
|
in_vpc: false
|
|
143
|
+
|
|
144
|
+
# AI/ML Services
|
|
145
|
+
ai_ml:
|
|
146
|
+
sagemaker:
|
|
147
|
+
primary: ["aws_sagemaker_endpoint", "aws_sagemaker_model", "aws_sagemaker_notebook_instance"]
|
|
148
|
+
secondary: ["aws_sagemaker_endpoint_configuration", "aws_sagemaker_domain", "aws_sagemaker_user_profile", "aws_sagemaker_app", "aws_sagemaker_feature_group"]
|
|
149
|
+
in_vpc: false
|
|
150
|
+
|
|
151
|
+
bedrock:
|
|
152
|
+
primary: ["aws_bedrock_custom_model", "aws_bedrock_model_invocation_logging_configuration"]
|
|
153
|
+
secondary: ["aws_bedrock_provisioned_model_throughput"]
|
|
154
|
+
in_vpc: false
|
|
155
|
+
|
|
156
|
+
comprehend:
|
|
157
|
+
primary: ["aws_comprehend_entity_recognizer", "aws_comprehend_document_classifier"]
|
|
158
|
+
secondary: []
|
|
159
|
+
in_vpc: false
|
|
160
|
+
|
|
161
|
+
rekognition:
|
|
162
|
+
primary: ["aws_rekognition_collection", "aws_rekognition_project"]
|
|
163
|
+
secondary: []
|
|
164
|
+
in_vpc: false
|
|
165
|
+
|
|
166
|
+
textract:
|
|
167
|
+
primary: []
|
|
168
|
+
secondary: []
|
|
169
|
+
in_vpc: false
|
|
170
|
+
|
|
171
|
+
polly:
|
|
172
|
+
primary: []
|
|
173
|
+
secondary: []
|
|
174
|
+
in_vpc: false
|
|
175
|
+
|
|
176
|
+
translate:
|
|
177
|
+
primary: []
|
|
178
|
+
secondary: []
|
|
179
|
+
in_vpc: false
|
|
180
|
+
|
|
181
|
+
lex:
|
|
182
|
+
primary: ["aws_lex_bot", "aws_lexv2_bot"]
|
|
183
|
+
secondary: ["aws_lex_intent", "aws_lex_slot_type", "aws_lexv2_bot_locale"]
|
|
184
|
+
in_vpc: false
|
|
185
|
+
|
|
186
|
+
# Analytics Services
|
|
187
|
+
analytics:
|
|
188
|
+
athena:
|
|
189
|
+
primary: ["aws_athena_workgroup", "aws_athena_database"]
|
|
190
|
+
secondary: ["aws_athena_named_query", "aws_athena_data_catalog"]
|
|
191
|
+
in_vpc: false
|
|
192
|
+
|
|
193
|
+
glue:
|
|
194
|
+
primary: ["aws_glue_catalog_database", "aws_glue_job", "aws_glue_crawler"]
|
|
195
|
+
secondary: ["aws_glue_catalog_table", "aws_glue_connection", "aws_glue_trigger", "aws_glue_workflow", "aws_glue_classifier"]
|
|
196
|
+
in_vpc: false
|
|
197
|
+
|
|
198
|
+
emr:
|
|
199
|
+
primary: ["aws_emr_cluster"]
|
|
200
|
+
secondary: ["aws_emr_instance_group", "aws_emr_security_configuration", "aws_emr_studio"]
|
|
201
|
+
in_vpc: true
|
|
202
|
+
|
|
203
|
+
opensearch:
|
|
204
|
+
primary: ["aws_opensearch_domain", "aws_elasticsearch_domain"]
|
|
205
|
+
secondary: ["aws_opensearch_domain_policy", "aws_elasticsearch_domain_policy"]
|
|
206
|
+
in_vpc: true
|
|
207
|
+
|
|
208
|
+
msk:
|
|
209
|
+
primary: ["aws_msk_cluster"]
|
|
210
|
+
secondary: ["aws_msk_configuration", "aws_msk_scram_secret_association"]
|
|
211
|
+
in_vpc: true
|
|
212
|
+
|
|
213
|
+
kinesis:
|
|
214
|
+
primary: ["aws_kinesis_stream", "aws_kinesis_firehose_delivery_stream"]
|
|
215
|
+
secondary: ["aws_kinesis_analytics_application", "aws_kinesisanalyticsv2_application"]
|
|
216
|
+
in_vpc: false
|
|
217
|
+
|
|
218
|
+
quicksight:
|
|
219
|
+
primary: ["aws_quicksight_data_source", "aws_quicksight_analysis"]
|
|
220
|
+
secondary: ["aws_quicksight_dashboard", "aws_quicksight_dataset", "aws_quicksight_user", "aws_quicksight_group"]
|
|
221
|
+
in_vpc: false
|
|
222
|
+
|
|
223
|
+
redshift:
|
|
224
|
+
primary: ["aws_redshift_cluster"]
|
|
225
|
+
secondary: ["aws_redshift_subnet_group", "aws_redshift_parameter_group", "aws_redshift_snapshot_schedule"]
|
|
226
|
+
in_vpc: true
|
|
227
|
+
|
|
228
|
+
# Developer Tools
|
|
229
|
+
developer_tools:
|
|
230
|
+
codecommit:
|
|
231
|
+
primary: ["aws_codecommit_repository"]
|
|
232
|
+
secondary: ["aws_codecommit_trigger", "aws_codecommit_approval_rule_template"]
|
|
233
|
+
in_vpc: false
|
|
234
|
+
|
|
235
|
+
codebuild:
|
|
236
|
+
primary: ["aws_codebuild_project"]
|
|
237
|
+
secondary: ["aws_codebuild_source_credential", "aws_codebuild_webhook", "aws_codebuild_report_group"]
|
|
238
|
+
in_vpc: false
|
|
239
|
+
|
|
240
|
+
codepipeline:
|
|
241
|
+
primary: ["aws_codepipeline"]
|
|
242
|
+
secondary: ["aws_codepipeline_webhook"]
|
|
243
|
+
in_vpc: false
|
|
244
|
+
|
|
245
|
+
codedeploy:
|
|
246
|
+
primary: ["aws_codedeploy_app", "aws_codedeploy_deployment_group"]
|
|
247
|
+
secondary: ["aws_codedeploy_deployment_config"]
|
|
248
|
+
in_vpc: false
|
|
249
|
+
|
|
250
|
+
codeartifact:
|
|
251
|
+
primary: ["aws_codeartifact_domain", "aws_codeartifact_repository"]
|
|
252
|
+
secondary: ["aws_codeartifact_domain_permissions_policy", "aws_codeartifact_repository_permissions_policy"]
|
|
253
|
+
in_vpc: false
|
|
254
|
+
|
|
255
|
+
# IoT Services
|
|
256
|
+
iot:
|
|
257
|
+
iot_core:
|
|
258
|
+
primary: ["aws_iot_thing", "aws_iot_policy"]
|
|
259
|
+
secondary: ["aws_iot_certificate", "aws_iot_thing_type", "aws_iot_topic_rule", "aws_iot_thing_principal_attachment"]
|
|
260
|
+
in_vpc: false
|
|
261
|
+
|
|
262
|
+
iot_analytics:
|
|
263
|
+
primary: ["aws_iotanalytics_channel", "aws_iotanalytics_pipeline", "aws_iotanalytics_datastore"]
|
|
264
|
+
secondary: ["aws_iotanalytics_dataset"]
|
|
265
|
+
in_vpc: false
|
|
266
|
+
|
|
267
|
+
iot_events:
|
|
268
|
+
primary: ["aws_iot_events_input", "aws_iot_events_detector_model"]
|
|
269
|
+
secondary: []
|
|
270
|
+
in_vpc: false
|
|
271
|
+
|
|
272
|
+
iot_greengrass:
|
|
273
|
+
primary: ["aws_greengrass_group"]
|
|
274
|
+
secondary: ["aws_greengrass_core_definition", "aws_greengrass_device_definition", "aws_greengrass_function_definition"]
|
|
275
|
+
in_vpc: false
|
|
276
|
+
|
|
277
|
+
# Media Services
|
|
278
|
+
media:
|
|
279
|
+
mediaconvert:
|
|
280
|
+
primary: ["aws_media_convert_queue"]
|
|
281
|
+
secondary: []
|
|
282
|
+
in_vpc: false
|
|
283
|
+
|
|
284
|
+
medialive:
|
|
285
|
+
primary: ["aws_medialive_channel", "aws_medialive_input"]
|
|
286
|
+
secondary: ["aws_medialive_input_security_group"]
|
|
287
|
+
in_vpc: false
|
|
288
|
+
|
|
289
|
+
mediapackage:
|
|
290
|
+
primary: ["aws_media_package_channel"]
|
|
291
|
+
secondary: []
|
|
292
|
+
in_vpc: false
|
|
293
|
+
|
|
294
|
+
mediastore:
|
|
295
|
+
primary: ["aws_media_store_container"]
|
|
296
|
+
secondary: ["aws_media_store_container_policy"]
|
|
297
|
+
in_vpc: false
|
|
298
|
+
|
|
299
|
+
# Additional Database Services
|
|
300
|
+
database_extended:
|
|
301
|
+
documentdb:
|
|
302
|
+
primary: ["aws_docdb_cluster"]
|
|
303
|
+
secondary: ["aws_docdb_cluster_instance", "aws_docdb_subnet_group", "aws_docdb_cluster_parameter_group"]
|
|
304
|
+
in_vpc: true
|
|
305
|
+
|
|
306
|
+
neptune:
|
|
307
|
+
primary: ["aws_neptune_cluster"]
|
|
308
|
+
secondary: ["aws_neptune_cluster_instance", "aws_neptune_subnet_group", "aws_neptune_parameter_group"]
|
|
309
|
+
in_vpc: true
|
|
310
|
+
|
|
311
|
+
memorydb:
|
|
312
|
+
primary: ["aws_memorydb_cluster"]
|
|
313
|
+
secondary: ["aws_memorydb_subnet_group", "aws_memorydb_parameter_group", "aws_memorydb_user", "aws_memorydb_acl"]
|
|
314
|
+
in_vpc: true
|
|
315
|
+
|
|
316
|
+
timestream:
|
|
317
|
+
primary: ["aws_timestreamwrite_database", "aws_timestreamwrite_table"]
|
|
318
|
+
secondary: []
|
|
319
|
+
in_vpc: false
|
|
320
|
+
|
|
321
|
+
qldb:
|
|
322
|
+
primary: ["aws_qldb_ledger"]
|
|
323
|
+
secondary: ["aws_qldb_stream"]
|
|
324
|
+
in_vpc: false
|
|
325
|
+
|
|
326
|
+
# Container Services Extended
|
|
327
|
+
containers:
|
|
328
|
+
ecr:
|
|
329
|
+
primary: ["aws_ecr_repository"]
|
|
330
|
+
secondary: ["aws_ecr_lifecycle_policy", "aws_ecr_repository_policy", "aws_ecr_replication_configuration"]
|
|
331
|
+
in_vpc: false
|
|
332
|
+
|
|
333
|
+
eks:
|
|
334
|
+
primary: ["aws_eks_cluster"]
|
|
335
|
+
secondary: ["aws_eks_node_group", "aws_eks_fargate_profile", "aws_eks_addon", "aws_eks_identity_provider_config"]
|
|
336
|
+
in_vpc: true
|
|
337
|
+
|
|
338
|
+
apprunner:
|
|
339
|
+
primary: ["aws_apprunner_service"]
|
|
340
|
+
secondary: ["aws_apprunner_connection", "aws_apprunner_auto_scaling_configuration_version", "aws_apprunner_vpc_connector"]
|
|
341
|
+
in_vpc: false
|
|
342
|
+
|
|
343
|
+
batch:
|
|
344
|
+
primary: ["aws_batch_compute_environment", "aws_batch_job_queue"]
|
|
345
|
+
secondary: ["aws_batch_job_definition", "aws_batch_scheduling_policy"]
|
|
346
|
+
in_vpc: true
|
|
347
|
+
|
|
348
|
+
# Management and Governance
|
|
349
|
+
management:
|
|
350
|
+
cloudtrail:
|
|
351
|
+
primary: ["aws_cloudtrail"]
|
|
352
|
+
secondary: ["aws_cloudtrail_event_data_store"]
|
|
353
|
+
in_vpc: false
|
|
354
|
+
|
|
355
|
+
config:
|
|
356
|
+
primary: ["aws_config_configuration_recorder", "aws_config_config_rule"]
|
|
357
|
+
secondary: ["aws_config_delivery_channel", "aws_config_configuration_aggregator"]
|
|
358
|
+
in_vpc: false
|
|
359
|
+
|
|
360
|
+
ssm:
|
|
361
|
+
primary: ["aws_ssm_parameter", "aws_ssm_document"]
|
|
362
|
+
secondary: ["aws_ssm_association", "aws_ssm_maintenance_window", "aws_ssm_patch_baseline"]
|
|
363
|
+
in_vpc: false
|
|
364
|
+
|
|
365
|
+
servicecatalog:
|
|
366
|
+
primary: ["aws_servicecatalog_portfolio", "aws_servicecatalog_product"]
|
|
367
|
+
secondary: ["aws_servicecatalog_portfolio_share", "aws_servicecatalog_principal_portfolio_association"]
|
|
368
|
+
in_vpc: false
|
|
369
|
+
|
|
370
|
+
organizations:
|
|
371
|
+
primary: ["aws_organizations_organization", "aws_organizations_account"]
|
|
372
|
+
secondary: ["aws_organizations_organizational_unit", "aws_organizations_policy"]
|
|
373
|
+
in_vpc: false
|
|
374
|
+
|
|
375
|
+
# Application Integration Extended
|
|
376
|
+
integration:
|
|
377
|
+
appsync:
|
|
378
|
+
primary: ["aws_appsync_graphql_api"]
|
|
379
|
+
secondary: ["aws_appsync_datasource", "aws_appsync_resolver", "aws_appsync_api_key"]
|
|
380
|
+
in_vpc: false
|
|
381
|
+
|
|
382
|
+
mq:
|
|
383
|
+
primary: ["aws_mq_broker"]
|
|
384
|
+
secondary: ["aws_mq_configuration"]
|
|
385
|
+
in_vpc: true
|
|
386
|
+
|
|
387
|
+
appflow:
|
|
388
|
+
primary: ["aws_appflow_flow"]
|
|
389
|
+
secondary: ["aws_appflow_connector_profile"]
|
|
390
|
+
in_vpc: false
|
|
391
|
+
|
|
392
|
+
# Observability
|
|
393
|
+
observability:
|
|
394
|
+
xray:
|
|
395
|
+
primary: ["aws_xray_sampling_rule", "aws_xray_group"]
|
|
396
|
+
secondary: ["aws_xray_encryption_config"]
|
|
397
|
+
in_vpc: false
|
|
398
|
+
|
|
399
|
+
prometheus:
|
|
400
|
+
primary: ["aws_prometheus_workspace"]
|
|
401
|
+
secondary: ["aws_prometheus_rule_group_namespace", "aws_prometheus_alert_manager_definition"]
|
|
402
|
+
in_vpc: false
|
|
403
|
+
|
|
404
|
+
grafana:
|
|
405
|
+
primary: ["aws_grafana_workspace"]
|
|
406
|
+
secondary: ["aws_grafana_role_association", "aws_grafana_workspace_api_key"]
|
|
407
|
+
in_vpc: false
|
terraformgraph/config_loader.py
CHANGED
|
@@ -12,11 +12,15 @@ class ConfigLoader:
|
|
|
12
12
|
def __init__(
|
|
13
13
|
self,
|
|
14
14
|
aggregation_rules_path: Optional[Path] = None,
|
|
15
|
-
logical_connections_path: Optional[Path] = None
|
|
15
|
+
logical_connections_path: Optional[Path] = None,
|
|
16
16
|
):
|
|
17
17
|
self._config_dir = Path(__file__).parent / "config"
|
|
18
|
-
self._aggregation_rules_path =
|
|
19
|
-
|
|
18
|
+
self._aggregation_rules_path = (
|
|
19
|
+
aggregation_rules_path or self._config_dir / "aggregation_rules.yaml"
|
|
20
|
+
)
|
|
21
|
+
self._logical_connections_path = (
|
|
22
|
+
logical_connections_path or self._config_dir / "logical_connections.yaml"
|
|
23
|
+
)
|
|
20
24
|
|
|
21
25
|
self._aggregation_rules: Optional[Dict[str, Any]] = None
|
|
22
26
|
self._logical_connections: Optional[List[Dict[str, Any]]] = None
|
|
@@ -39,7 +43,7 @@ class ConfigLoader:
|
|
|
39
43
|
if not path.exists():
|
|
40
44
|
raise FileNotFoundError(f"Configuration file not found: {path}")
|
|
41
45
|
|
|
42
|
-
with open(path, "r") as f:
|
|
46
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
43
47
|
return yaml.safe_load(f) or {}
|
|
44
48
|
|
|
45
49
|
def get_flat_aggregation_rules(self) -> Dict[str, Dict[str, Any]]:
|
|
@@ -48,8 +52,5 @@ class ConfigLoader:
|
|
|
48
52
|
flat = {}
|
|
49
53
|
for category, services in rules.items():
|
|
50
54
|
for service_name, config in services.items():
|
|
51
|
-
flat[service_name] = {
|
|
52
|
-
"category": category,
|
|
53
|
-
**config
|
|
54
|
-
}
|
|
55
|
+
flat[service_name] = {"category": category, **config}
|
|
55
56
|
return flat
|