replimap 0.4.18__tar.gz → 0.5.2__tar.gz
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.
- {replimap-0.4.18 → replimap-0.5.2}/PKG-INFO +2 -5
- {replimap-0.4.18 → replimap-0.5.2}/README.md +1 -4
- replimap-0.5.2/replimap/__init__.py +10 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/__init__.py +4 -36
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/codify.py +1 -1
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/doctor.py +2 -2
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/license.py +33 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/scan.py +36 -1
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/context.py +45 -6
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/generators/hcl.py +1 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/default_filter.py +9 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/import_resolver.py +14 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/ref_transformer.py +16 -2
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/context.py +23 -3
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/filters.py +35 -9
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/identity.py +3 -3
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/models.py +3 -0
- replimap-0.5.2/replimap/core/type_aliases.py +197 -0
- replimap-0.5.2/replimap/cost/__init__.py +60 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/data/schema_rules.yaml +81 -1
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/state_parser.py +3 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/__init__.py +1 -19
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/gates.py +3 -300
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/manager.py +73 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/prompts.py +0 -342
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/base.py +36 -0
- replimap-0.5.2/replimap/scanners/rds_scanner.py +539 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/ui/__init__.py +0 -18
- replimap-0.4.18/replimap/__init__.py +0 -9
- replimap-0.4.18/replimap/cache/__init__.py +0 -39
- replimap-0.4.18/replimap/cache/snapshots.py +0 -868
- replimap-0.4.18/replimap/cli/commands/clone.py +0 -635
- replimap-0.4.18/replimap/cli/commands/cost.py +0 -459
- replimap-0.4.18/replimap/cli/commands/dr.py +0 -364
- replimap-0.4.18/replimap/cli/commands/snapshot.py +0 -701
- replimap-0.4.18/replimap/cli/commands/transfer.py +0 -218
- replimap-0.4.18/replimap/cli/commands/trends.py +0 -209
- replimap-0.4.18/replimap/cli/commands/unused.py +0 -348
- replimap-0.4.18/replimap/cost/__init__.py +0 -211
- replimap-0.4.18/replimap/cost/explorer.py +0 -612
- replimap-0.4.18/replimap/cost/local_rightsizer.py +0 -401
- replimap-0.4.18/replimap/cost/pricing_engine.py +0 -812
- replimap-0.4.18/replimap/cost/reporter.py +0 -1437
- replimap-0.4.18/replimap/cost/ri_aware.py +0 -1254
- replimap-0.4.18/replimap/cost/rightsizer.py +0 -558
- replimap-0.4.18/replimap/cost/transfer_analyzer.py +0 -916
- replimap-0.4.18/replimap/cost/trends.py +0 -730
- replimap-0.4.18/replimap/cost/unused_detector.py +0 -782
- replimap-0.4.18/replimap/decisions/cli.py +0 -387
- replimap-0.4.18/replimap/recovery/__init__.py +0 -19
- replimap-0.4.18/replimap/recovery/actions.py +0 -189
- replimap-0.4.18/replimap/recovery/engine.py +0 -477
- replimap-0.4.18/replimap/recovery/gray_zone.py +0 -322
- replimap-0.4.18/replimap/renderers/__init__.py +0 -64
- replimap-0.4.18/replimap/renderers/audit_annotator.py +0 -491
- replimap-0.4.18/replimap/renderers/backend.py +0 -496
- replimap-0.4.18/replimap/renderers/base.py +0 -74
- replimap-0.4.18/replimap/renderers/cloudformation.py +0 -663
- replimap-0.4.18/replimap/renderers/file_router.py +0 -357
- replimap-0.4.18/replimap/renderers/import_generator.py +0 -584
- replimap-0.4.18/replimap/renderers/name_generator.py +0 -381
- replimap-0.4.18/replimap/renderers/preloader.py +0 -672
- replimap-0.4.18/replimap/renderers/pulumi.py +0 -765
- replimap-0.4.18/replimap/renderers/refactoring.py +0 -505
- replimap-0.4.18/replimap/renderers/terraform.py +0 -2312
- replimap-0.4.18/replimap/renderers/terraform_v2.py +0 -500
- replimap-0.4.18/replimap/renderers/variable_extractor.py +0 -389
- replimap-0.4.18/replimap/scanners/rds_scanner.py +0 -273
- replimap-0.4.18/replimap/snapshot/__init__.py +0 -42
- replimap-0.4.18/replimap/snapshot/differ.py +0 -500
- replimap-0.4.18/replimap/snapshot/models.py +0 -411
- replimap-0.4.18/replimap/snapshot/reporter.py +0 -476
- replimap-0.4.18/replimap/snapshot/store.py +0 -269
- replimap-0.4.18/replimap/transformers/__init__.py +0 -62
- replimap-0.4.18/replimap/transformers/base.py +0 -103
- replimap-0.4.18/replimap/transformers/downsizer.py +0 -402
- replimap-0.4.18/replimap/transformers/network_remapper.py +0 -246
- replimap-0.4.18/replimap/transformers/renamer.py +0 -234
- replimap-0.4.18/replimap/transformers/sanitizer.py +0 -260
- replimap-0.4.18/replimap/ui/snapshot_panels.py +0 -265
- replimap-0.4.18/replimap/ui/snapshot_tables.py +0 -178
- {replimap-0.4.18 → replimap-0.5.2}/.gitignore +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/LICENSE +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/MANIFEST.in +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/docs/assets/demo.gif +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/docs/history/README.md +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/pyproject.toml +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/api.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/apra_cps234_mapping.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/checkov_runner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/classifier.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/engine.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/exporters.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/fix_suggestions.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/hooks.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/nzism_mapping.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/rbnz_bs11_mapping.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/remediation/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/remediation/generator.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/remediation/models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/remediation/templates/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/remediation/templates/ec2.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/remediation/templates/kms.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/remediation/templates/rds.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/remediation/templates/s3.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/renderer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/reporter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/soc2_mapping.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/templates/audit_report.html.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/terminal_reporter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/audit/trust_center.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/analyze.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/audit.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/cache.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/completion.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/deps.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/drift.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/explain.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/graph.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/iam.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/load.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/profiles.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/remediate.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/residency.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/trust_center.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/upgrade.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/commands/validate.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/common_options.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/completers.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/completion.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/config.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/error_catalog.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/error_renderer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/errors.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/output.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/params/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/params/definitions.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/params/registry.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/params/schema.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/state.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/telemetry.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/aws_session.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/cache_resolution.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/console.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/console_links.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/deprecation.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/error_handler.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/helpers.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/options.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cli/utils/tips.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/coverage/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/coverage/classify.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/coverage/normalize.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/coverage/report.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/coverage/state_merge.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/empty_pruner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/generators/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/generators/backend.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/generators/imports.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/generators/output.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/generators/readme.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/generators/variables.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/hcl_types.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/pipeline.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/schema_mapper.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/schema_rules.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/set_sorter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/base.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/cleanup_transformer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/data_source_filter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/global_filter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/iam_normalizer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/lifecycle_protector.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/managed_filter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/naming_transformer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/schema_filter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/secrets_transformer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transformers/sg_splitter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/transforms.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/type_caster.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/utils/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/codify/utils/config_integrity_checker.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/audit/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/audit/renderer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/codify_checker.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/compliance_tf_registry.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/data_residency.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/drift/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/drift/exemptions.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/drift/mapping.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/drift/report.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/compliance/drift/rules.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/analysis/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/analysis/centrality.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/async_aws.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/aws_config.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/bootstrap.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/browser.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/cache.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/cache_manager.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/circuit_breaker.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/concurrency.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/config.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/constants.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/enrichment/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/enrichment/enricher.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/enrichment/metadata_extractor.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/enrichment/network_analyzer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/errors.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/first_run.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/formatters/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/formatters/sarif.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/graph/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/graph/algorithms.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/graph_engine.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/graph_tracer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/identity_resolver.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/logging.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/naming.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/operations.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/pagination.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/pagination_config.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/rate_limiter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/resilience/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/resilience/circuit_breaker.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/resilience/errors/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/resilience/errors/classifier.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/resilience/errors/loader.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/resilience/errors/rules.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/retry.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/sanitizer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/scope.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/credential_checker.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/drift.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/global_sanitizer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/iam_generator.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/patterns.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/redactor.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/scrubber.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/session_manager.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/security/storage.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/selection.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/signals.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/state.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/storage.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/topology_constraints.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/unified_storage/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/unified_storage/adapter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/unified_storage/base.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/unified_storage/engine.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/unified_storage/migrate.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/core/unified_storage/sqlite_backend.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cost/constants.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cost/estimator.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cost/models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/cost/pricing.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/data/field_hints.yaml +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/decisions/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/decisions/manager.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/decisions/models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/dependencies/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/dependencies/graph_builder.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/dependencies/impact_calculator.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/dependencies/models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/dependencies/reporter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/dependencies/weights.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/asg.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/ec2.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/elasticache.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/elb.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/graph_fallback.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/iam_role.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/lambda_func.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/rds.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/s3.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/analyzers/security_group.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/base_analyzer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/blast_radius.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/implicit_resolver.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/deps/reporter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/dr/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/dr/readiness.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/comparator.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/engine.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/ignore.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/normalizer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/reporter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/drift/templates/drift_report.html.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/extraction/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/extraction/hints.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/aggregation.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/builder.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/cost_overlay.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/cross_region.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/drift.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/environment.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/filters.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/formatters/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/formatters/d3.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/formatters/json_format.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/formatters/mermaid.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/global_context.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/grouper.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/layout.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/link_classification.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/multi_region.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/naming.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/orphan_detection.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/summary_links.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/templates/graph.html.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/templates/vendor/d3.v7.min.js +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/tool_modes.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/views.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/graph/visualizer.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/cache.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/ci_adapter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/crypto/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/crypto/keys.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/crypto/time_validator.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/fingerprint.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/secure_models.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/tracker.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/licensing/verifier.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/main.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/mcp_server.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/migrations/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/migrations/sanitize_cache.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/patterns/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/patterns/local_module.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/async_base.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/async_vpc_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/compute_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/ec2_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/elasticache_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/iam_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/implementations/__init__.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/implementations/s3_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/implementations/vpc_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/incremental.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/legacy_adapter.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/messaging_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/monitoring_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/networking_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/s3_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/storage_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/unified_base.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/unified_scanners.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/scanners/vpc_scanner.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/autoscaling_group.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/db_parameter_group.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/db_subnet_group.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/ebs_volume.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/ec2_instance.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/elasticache_cluster.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/elasticache_subnet_group.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/internet_gateway.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/launch_template.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/lb.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/lb_listener.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/lb_target_group.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/nat_gateway.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/network_acl.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/rds_instance.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/route_table.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/s3_bucket.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/s3_bucket_policy.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/security_group.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/sns_topic.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/sqs_queue.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/subnet.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/vpc.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/templates/vpc_endpoint.tf.j2 +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/ui/console.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/replimap/ui/rich_output.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/scripts/check_stdout_hygiene.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/scripts/record_cassettes.py +0 -0
- {replimap-0.4.18 → replimap-0.5.2}/scripts/verify_compliance_tf_subdomains.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: replimap
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: AWS Infrastructure Intelligence Engine — Scan, Understand, Transform
|
|
5
5
|
Project-URL: Homepage, https://replimap.com
|
|
6
6
|
Project-URL: Documentation, https://replimap.com/docs
|
|
@@ -240,9 +240,7 @@ Exemptions appear as "Accepted Risks" in reports. Expired exemptions are automat
|
|
|
240
240
|
| `replimap audit` | Security audit (Checkov-based or SOC 2 evidence with `--state`) |
|
|
241
241
|
| `replimap graph` | Generate visual dependency graph |
|
|
242
242
|
| `replimap analyze` | Analyze for critical resources, SPOFs, blast radius |
|
|
243
|
-
| `replimap cost` | Estimate monthly AWS costs |
|
|
244
243
|
| `replimap deps` | Explore dependencies for a resource |
|
|
245
|
-
| `replimap unused` | Detect unused and underutilized resources |
|
|
246
244
|
|
|
247
245
|
<details>
|
|
248
246
|
<summary>View all commands</summary>
|
|
@@ -251,7 +249,7 @@ Exemptions appear as "Accepted Risks" in reports. Expired exemptions are automat
|
|
|
251
249
|
replimap --help
|
|
252
250
|
```
|
|
253
251
|
|
|
254
|
-
Additional commands: `
|
|
252
|
+
Additional commands: `iam`, `trust-center`, `remediate`, `validate`, `residency`, `doctor`, `license`, `upgrade`
|
|
255
253
|
|
|
256
254
|
</details>
|
|
257
255
|
|
|
@@ -344,7 +342,6 @@ See [SECURITY.md](SECURITY.md) for details.
|
|
|
344
342
|
- [x] compliance.tf integration for codify output (16 verified core frameworks, 21 modules, shared `--compliance` alias resolution across codify/drift/audit)
|
|
345
343
|
- [ ] EKS, DynamoDB, CloudTrail, VPC Flow Logs coverage
|
|
346
344
|
- [ ] CI/CD integration templates (GitHub Actions, Azure DevOps)
|
|
347
|
-
- [ ] Pulumi and CDK output formats
|
|
348
345
|
|
|
349
346
|
---
|
|
350
347
|
|
|
@@ -187,9 +187,7 @@ Exemptions appear as "Accepted Risks" in reports. Expired exemptions are automat
|
|
|
187
187
|
| `replimap audit` | Security audit (Checkov-based or SOC 2 evidence with `--state`) |
|
|
188
188
|
| `replimap graph` | Generate visual dependency graph |
|
|
189
189
|
| `replimap analyze` | Analyze for critical resources, SPOFs, blast radius |
|
|
190
|
-
| `replimap cost` | Estimate monthly AWS costs |
|
|
191
190
|
| `replimap deps` | Explore dependencies for a resource |
|
|
192
|
-
| `replimap unused` | Detect unused and underutilized resources |
|
|
193
191
|
|
|
194
192
|
<details>
|
|
195
193
|
<summary>View all commands</summary>
|
|
@@ -198,7 +196,7 @@ Exemptions appear as "Accepted Risks" in reports. Expired exemptions are automat
|
|
|
198
196
|
replimap --help
|
|
199
197
|
```
|
|
200
198
|
|
|
201
|
-
Additional commands: `
|
|
199
|
+
Additional commands: `iam`, `trust-center`, `remediate`, `validate`, `residency`, `doctor`, `license`, `upgrade`
|
|
202
200
|
|
|
203
201
|
</details>
|
|
204
202
|
|
|
@@ -291,7 +289,6 @@ See [SECURITY.md](SECURITY.md) for details.
|
|
|
291
289
|
- [x] compliance.tf integration for codify output (16 verified core frameworks, 21 modules, shared `--compliance` alias resolution across codify/drift/audit)
|
|
292
290
|
- [ ] EKS, DynamoDB, CloudTrail, VPC Flow Logs coverage
|
|
293
291
|
- [ ] CI/CD integration templates (GitHub Actions, Azure DevOps)
|
|
294
|
-
- [ ] Pulumi and CDK output formats
|
|
295
292
|
|
|
296
293
|
---
|
|
297
294
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
RepliMap - AWS Infrastructure Intelligence Engine
|
|
3
|
+
|
|
4
|
+
Scan, understand, and transform your AWS infrastructure: build a dependency
|
|
5
|
+
graph, audit security posture, and adopt existing (ClickOps) resources into
|
|
6
|
+
Terraform.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
__version__ = "0.5.2"
|
|
10
|
+
__author__ = "RepliMap Team"
|
|
@@ -20,13 +20,10 @@ from replimap.cli.commands import (
|
|
|
20
20
|
analyze,
|
|
21
21
|
audit,
|
|
22
22
|
cache,
|
|
23
|
-
clone,
|
|
24
23
|
codify,
|
|
25
24
|
completion,
|
|
26
|
-
cost,
|
|
27
25
|
deps,
|
|
28
26
|
doctor,
|
|
29
|
-
dr,
|
|
30
27
|
drift,
|
|
31
28
|
explain,
|
|
32
29
|
graph,
|
|
@@ -37,15 +34,10 @@ from replimap.cli.commands import (
|
|
|
37
34
|
remediate,
|
|
38
35
|
residency,
|
|
39
36
|
scan,
|
|
40
|
-
snapshot,
|
|
41
|
-
transfer,
|
|
42
|
-
trends,
|
|
43
37
|
trust_center,
|
|
44
|
-
unused,
|
|
45
38
|
upgrade,
|
|
46
39
|
validate,
|
|
47
40
|
)
|
|
48
|
-
from replimap.decisions.cli import create_decisions_app
|
|
49
41
|
|
|
50
42
|
|
|
51
43
|
def register_all_commands(app: typer.Typer) -> None:
|
|
@@ -57,12 +49,11 @@ def register_all_commands(app: typer.Typer) -> None:
|
|
|
57
49
|
|
|
58
50
|
Commands are organized into groups for better help output:
|
|
59
51
|
- Core Commands: scan, graph, load, profiles
|
|
60
|
-
- Infrastructure as Code:
|
|
52
|
+
- Infrastructure as Code: codify, remediate
|
|
61
53
|
- Analysis: analyze, deps, drift, validate
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
- Configuration: cache, scan-cache, doctor, license, upgrade, decisions, completion
|
|
54
|
+
- Security & Compliance: audit, iam, residency, trust-center
|
|
55
|
+
- Configuration: cache, doctor, license, upgrade, completion
|
|
56
|
+
- Help & Debugging: explain
|
|
66
57
|
|
|
67
58
|
Args:
|
|
68
59
|
app: The Typer application instance
|
|
@@ -78,7 +69,6 @@ def register_all_commands(app: typer.Typer) -> None:
|
|
|
78
69
|
# ========================================
|
|
79
70
|
# Infrastructure as Code
|
|
80
71
|
# ========================================
|
|
81
|
-
clone.register(app, panel="Infrastructure as Code")
|
|
82
72
|
codify.register(app, panel="Infrastructure as Code")
|
|
83
73
|
remediate.register(app, panel="Infrastructure as Code")
|
|
84
74
|
|
|
@@ -90,14 +80,6 @@ def register_all_commands(app: typer.Typer) -> None:
|
|
|
90
80
|
drift.register(app, panel="Analysis")
|
|
91
81
|
validate.register(app, panel="Analysis")
|
|
92
82
|
|
|
93
|
-
# ========================================
|
|
94
|
-
# Cost Optimization
|
|
95
|
-
# ========================================
|
|
96
|
-
cost.register(app, panel="Cost Optimization")
|
|
97
|
-
unused.register(app, panel="Cost Optimization")
|
|
98
|
-
trends.register(app, panel="Cost Optimization")
|
|
99
|
-
transfer.register(app, panel="Cost Optimization")
|
|
100
|
-
|
|
101
83
|
# ========================================
|
|
102
84
|
# Security & Compliance
|
|
103
85
|
# ========================================
|
|
@@ -106,12 +88,6 @@ def register_all_commands(app: typer.Typer) -> None:
|
|
|
106
88
|
residency.register(app, panel="Security & Compliance")
|
|
107
89
|
trust_center.register(app, panel="Security & Compliance")
|
|
108
90
|
|
|
109
|
-
# ========================================
|
|
110
|
-
# Disaster Recovery
|
|
111
|
-
# ========================================
|
|
112
|
-
snapshot.register(app, panel="Disaster Recovery")
|
|
113
|
-
dr.register(app, panel="Disaster Recovery")
|
|
114
|
-
|
|
115
91
|
# ========================================
|
|
116
92
|
# Configuration & Utilities
|
|
117
93
|
# ========================================
|
|
@@ -120,7 +96,6 @@ def register_all_commands(app: typer.Typer) -> None:
|
|
|
120
96
|
license.register(app, panel="Configuration")
|
|
121
97
|
upgrade.register(app, panel="Configuration")
|
|
122
98
|
completion.register(app, panel="Configuration")
|
|
123
|
-
app.add_typer(create_decisions_app(), rich_help_panel="Configuration")
|
|
124
99
|
|
|
125
100
|
# ========================================
|
|
126
101
|
# Help & Debugging
|
|
@@ -131,7 +106,6 @@ def register_all_commands(app: typer.Typer) -> None:
|
|
|
131
106
|
__all__ = [
|
|
132
107
|
"register_all_commands",
|
|
133
108
|
"scan",
|
|
134
|
-
"clone",
|
|
135
109
|
"codify",
|
|
136
110
|
"analyze",
|
|
137
111
|
"load",
|
|
@@ -140,20 +114,14 @@ __all__ = [
|
|
|
140
114
|
"graph",
|
|
141
115
|
"drift",
|
|
142
116
|
"deps",
|
|
143
|
-
"cost",
|
|
144
117
|
"remediate",
|
|
145
118
|
"residency",
|
|
146
119
|
"validate",
|
|
147
|
-
"unused",
|
|
148
|
-
"trends",
|
|
149
|
-
"transfer",
|
|
150
120
|
"cache",
|
|
151
121
|
"iam",
|
|
152
122
|
"license",
|
|
153
123
|
"upgrade",
|
|
154
|
-
"snapshot",
|
|
155
124
|
"trust_center",
|
|
156
|
-
"dr",
|
|
157
125
|
"completion",
|
|
158
126
|
"doctor",
|
|
159
127
|
"explain",
|
|
@@ -310,7 +310,7 @@ def register(app: typer.Typer, panel: str | None = None) -> None:
|
|
|
310
310
|
config_content = (
|
|
311
311
|
f"[bold]RepliMap Codify[/] v{__version__}\n"
|
|
312
312
|
f"Region: [cyan]{effective_region}[/] [dim](from {region_source})[/]\n"
|
|
313
|
-
f"Profile: [cyan]{effective_profile}[/]\n"
|
|
313
|
+
f"Profile: [cyan]{effective_profile or 'default'}[/]\n"
|
|
314
314
|
f"Output: [cyan]{output_dir}[/]\n"
|
|
315
315
|
f"Primary Region: [cyan]{effective_primary_region}[/]\n"
|
|
316
316
|
f"Lifecycle Protection: [cyan]{not no_lifecycle_protection}[/]\n"
|
|
@@ -475,7 +475,7 @@ class DoctorCommand:
|
|
|
475
475
|
name="Decisions",
|
|
476
476
|
status=CheckStatus.WARN,
|
|
477
477
|
message=f"{counts['expired']} expired decisions",
|
|
478
|
-
|
|
478
|
+
details="Remove ~/.replimap/decisions.yaml entries manually",
|
|
479
479
|
)
|
|
480
480
|
)
|
|
481
481
|
elif counts["expiring_soon"] > 0:
|
|
@@ -484,7 +484,7 @@ class DoctorCommand:
|
|
|
484
484
|
name="Decisions",
|
|
485
485
|
status=CheckStatus.WARN,
|
|
486
486
|
message=f"{counts['expiring_soon']} decisions expiring soon",
|
|
487
|
-
details="
|
|
487
|
+
details="Review ~/.replimap/decisions.yaml",
|
|
488
488
|
)
|
|
489
489
|
)
|
|
490
490
|
else:
|
|
@@ -138,6 +138,31 @@ def create_license_app() -> typer.Typer:
|
|
|
138
138
|
f"Email: {license_obj.email}\n"
|
|
139
139
|
f"Expires: {expires}"
|
|
140
140
|
)
|
|
141
|
+
elif manager.last_cache_rejection is not None:
|
|
142
|
+
# dogfood #8: a cached license exists on disk but couldn't be
|
|
143
|
+
# used (e.g. machine-fingerprint mismatch after a WSL kernel
|
|
144
|
+
# update) — without this branch the panel below is
|
|
145
|
+
# indistinguishable from "never activated", hiding the
|
|
146
|
+
# one-command fix (`license activate`/rebind) from the user.
|
|
147
|
+
expires = None
|
|
148
|
+
rejection = manager.last_cache_rejection
|
|
149
|
+
status_color = "yellow"
|
|
150
|
+
status_icon = "[yellow]Not usable[/]"
|
|
151
|
+
plan_line = (
|
|
152
|
+
f"Cached plan: [bold cyan]{rejection.plan.value.upper()}[/]\n"
|
|
153
|
+
if rejection.plan
|
|
154
|
+
else ""
|
|
155
|
+
)
|
|
156
|
+
key_line = f"Key: {rejection.masked_key}\n" if rejection.masked_key else ""
|
|
157
|
+
info = (
|
|
158
|
+
f"Plan: [bold cyan]{plan_name}[/] [dim](falling back to free tier)[/]\n"
|
|
159
|
+
f"Status: {status_icon}\n"
|
|
160
|
+
f"{plan_line}"
|
|
161
|
+
f"{key_line}"
|
|
162
|
+
f"[yellow]Cached license present but not usable: "
|
|
163
|
+
f"{rejection.reason}[/]\n"
|
|
164
|
+
"[dim]Run `replimap license activate <key>` to rebind.[/]"
|
|
165
|
+
)
|
|
141
166
|
else:
|
|
142
167
|
expires = None
|
|
143
168
|
info = (
|
|
@@ -251,6 +276,14 @@ def create_license_app() -> typer.Typer:
|
|
|
251
276
|
}
|
|
252
277
|
if usage_data:
|
|
253
278
|
result_data["usage"] = usage_data
|
|
279
|
+
if manager.last_cache_rejection is not None:
|
|
280
|
+
rejection = manager.last_cache_rejection
|
|
281
|
+
result_data["cache_rejection"] = {
|
|
282
|
+
"reason": rejection.reason,
|
|
283
|
+
"plan": rejection.plan.value if rejection.plan else None,
|
|
284
|
+
"masked_key": rejection.masked_key,
|
|
285
|
+
"rebind_command": "replimap license activate <key>",
|
|
286
|
+
}
|
|
254
287
|
output.present(result_data)
|
|
255
288
|
|
|
256
289
|
@license_app.command("deactivate")
|
|
@@ -54,11 +54,13 @@ from replimap.core import (
|
|
|
54
54
|
)
|
|
55
55
|
from replimap.core.cache_manager import save_graph_to_cache
|
|
56
56
|
from replimap.core.rate_limiter import get_limiter
|
|
57
|
+
from replimap.core.type_aliases import UnknownResourceTypeError, expand_types
|
|
57
58
|
from replimap.licensing import Feature, check_scan_allowed, get_scans_remaining
|
|
58
59
|
from replimap.licensing.manager import get_license_manager
|
|
59
60
|
from replimap.licensing.tracker import get_usage_tracker
|
|
60
61
|
from replimap.scanners.base import (
|
|
61
62
|
AWSPermissionError,
|
|
63
|
+
count_scanners_for_types,
|
|
62
64
|
drain_item_failures,
|
|
63
65
|
get_total_scanner_count,
|
|
64
66
|
run_all_scanners,
|
|
@@ -132,7 +134,11 @@ def register(app: typer.Typer, panel: str | None = None) -> None:
|
|
|
132
134
|
None,
|
|
133
135
|
"--types",
|
|
134
136
|
"-t",
|
|
135
|
-
help=
|
|
137
|
+
help=(
|
|
138
|
+
"Filter by resource types, comma-separated. Accepts service "
|
|
139
|
+
"aliases (rds, ec2, s3, iam, ...) or literal Terraform types "
|
|
140
|
+
"(aws_db_instance)"
|
|
141
|
+
),
|
|
136
142
|
rich_help_panel="Selection",
|
|
137
143
|
),
|
|
138
144
|
tag: list[str] | None = typer.Option(
|
|
@@ -368,6 +374,26 @@ def register(app: typer.Typer, panel: str | None = None) -> None:
|
|
|
368
374
|
output.error(gate_result.prompt)
|
|
369
375
|
raise typer.Exit(EXIT_GENERAL_ERROR)
|
|
370
376
|
|
|
377
|
+
# Pre-expand --types/--exclude-types before any AWS calls (dogfood
|
|
378
|
+
# #7/#3): validated here, once, so an unknown value fails fast
|
|
379
|
+
# instead of silently matching nothing. The expanded --types set
|
|
380
|
+
# also drives scanner *selection* below (skip scanners whose
|
|
381
|
+
# output the user didn't ask for) — the post-hoc ScanFilter still
|
|
382
|
+
# runs afterwards as a second pass over the same alias table.
|
|
383
|
+
requested_types: set[str] | None = None
|
|
384
|
+
if types:
|
|
385
|
+
try:
|
|
386
|
+
requested_types = expand_types(types.split(","))
|
|
387
|
+
except UnknownResourceTypeError as e:
|
|
388
|
+
output.error(str(e))
|
|
389
|
+
raise typer.Exit(EXIT_GENERAL_ERROR) from e
|
|
390
|
+
if exclude_types:
|
|
391
|
+
try:
|
|
392
|
+
expand_types(exclude_types.split(","))
|
|
393
|
+
except UnknownResourceTypeError as e:
|
|
394
|
+
output.error(str(e))
|
|
395
|
+
raise typer.Exit(EXIT_GENERAL_ERROR) from e
|
|
396
|
+
|
|
371
397
|
# Show plan badge with dev mode indicator
|
|
372
398
|
if manager.is_dev_mode:
|
|
373
399
|
plan_badge = "[yellow](dev mode)[/]"
|
|
@@ -475,6 +501,14 @@ def register(app: typer.Typer, panel: str | None = None) -> None:
|
|
|
475
501
|
output.progress("Performing incremental scan for updated resources...")
|
|
476
502
|
|
|
477
503
|
total_scanners = get_total_scanner_count()
|
|
504
|
+
if requested_types:
|
|
505
|
+
filtered_total = count_scanners_for_types(requested_types)
|
|
506
|
+
skipped_scanners = total_scanners - filtered_total
|
|
507
|
+
if skipped_scanners:
|
|
508
|
+
output.progress(
|
|
509
|
+
f"{skipped_scanners} scanner(s) skipped (--types {types})"
|
|
510
|
+
)
|
|
511
|
+
total_scanners = filtered_total
|
|
478
512
|
|
|
479
513
|
# Always show progress bar (--quiet only suppresses INFO logs)
|
|
480
514
|
# Use stderr console for V3 stdout hygiene
|
|
@@ -516,6 +550,7 @@ def register(app: typer.Typer, panel: str | None = None) -> None:
|
|
|
516
550
|
graph,
|
|
517
551
|
parallel=use_parallel,
|
|
518
552
|
on_scanner_complete=on_scanner_complete,
|
|
553
|
+
requested_types=requested_types,
|
|
519
554
|
)
|
|
520
555
|
|
|
521
556
|
# Items dropped after per-item retries (scanner itself succeeded,
|
|
@@ -8,7 +8,8 @@ Contains:
|
|
|
8
8
|
- config: ConfigManager (profile-aware configuration)
|
|
9
9
|
- state: StateManager (runtime state)
|
|
10
10
|
- output: OutputManager (stdout/stderr separation)
|
|
11
|
-
- profile: str (current AWS profile
|
|
11
|
+
- profile: str | None (current AWS profile; None means "not specified by
|
|
12
|
+
the user" — see the `from_cli` docstring for why this matters)
|
|
12
13
|
- region: str (current AWS region)
|
|
13
14
|
|
|
14
15
|
Usage:
|
|
@@ -46,14 +47,17 @@ class GlobalContext:
|
|
|
46
47
|
access to all V3 managers from any command.
|
|
47
48
|
|
|
48
49
|
Attributes:
|
|
49
|
-
profile: Active AWS profile name
|
|
50
|
+
profile: Active AWS profile name. None when the user never
|
|
51
|
+
specified one (no -p flag, no AWS_PROFILE, no explicit config
|
|
52
|
+
entry) — see `from_cli` for why this is None rather than the
|
|
53
|
+
literal string "default".
|
|
50
54
|
region: Active AWS region
|
|
51
55
|
config: Configuration manager (profile-aware)
|
|
52
56
|
state: State manager (runtime persistence)
|
|
53
57
|
output: Output manager (stdout hygiene)
|
|
54
58
|
"""
|
|
55
59
|
|
|
56
|
-
profile: str
|
|
60
|
+
profile: str | None
|
|
57
61
|
region: str
|
|
58
62
|
config: ConfigManager
|
|
59
63
|
state: StateManager
|
|
@@ -145,11 +149,44 @@ class GlobalContext:
|
|
|
145
149
|
# Create state manager
|
|
146
150
|
state = create_state_manager()
|
|
147
151
|
|
|
148
|
-
# Determine effective profile
|
|
149
|
-
|
|
152
|
+
# Determine effective profile.
|
|
153
|
+
#
|
|
154
|
+
# dogfood #6: this used to always resolve to the literal string
|
|
155
|
+
# "default" when the user gave no -p flag / AWS_PROFILE / config
|
|
156
|
+
# entry, because ConfigManager.get("profile", "default") falls
|
|
157
|
+
# through to DEFAULTS["profile"] = "default". That value then
|
|
158
|
+
# flowed straight into boto3.Session(profile_name="default"),
|
|
159
|
+
# which SKIPS the AWS_ACCESS_KEY_ID/SECRET/SESSION_TOKEN env-var
|
|
160
|
+
# credential chain entirely — breaking aws-vault / CI env-cred
|
|
161
|
+
# workflows with a wall of misleading "Permission denied" errors.
|
|
162
|
+
#
|
|
163
|
+
# Fix: distinguish "genuinely unspecified" (-> None, so boto3 runs
|
|
164
|
+
# its full default chain: env vars -> shared config -> SSO ->
|
|
165
|
+
# IMDS) from "the user (or their config file) explicitly asked
|
|
166
|
+
# for the 'default' profile" (-> keep the literal string, since
|
|
167
|
+
# that's real user intent, not a filled-in placeholder).
|
|
168
|
+
# ConfigManager's resolution log tells the two apart: a value
|
|
169
|
+
# resolved from `DEFAULTS` (source == "default") never came from
|
|
170
|
+
# the user; cli/env/profile/global config values did.
|
|
171
|
+
if profile is not None:
|
|
172
|
+
# Typer already resolved -p / AWS_PROFILE into this parameter
|
|
173
|
+
# (envvar="AWS_PROFILE" on the option) — always explicit.
|
|
174
|
+
effective_profile: str | None = profile
|
|
175
|
+
else:
|
|
176
|
+
config.get("profile", "default") # populate the resolution log
|
|
177
|
+
profile_resolution = config._resolution_log.get("profile")
|
|
178
|
+
if (
|
|
179
|
+
profile_resolution is not None
|
|
180
|
+
and profile_resolution.source != "default"
|
|
181
|
+
):
|
|
182
|
+
effective_profile = profile_resolution.value
|
|
183
|
+
else:
|
|
184
|
+
effective_profile = None
|
|
185
|
+
|
|
150
186
|
effective_region = region or config.get("region", "us-east-1")
|
|
151
187
|
|
|
152
188
|
# If no profile/region specified, check state for last-used values
|
|
189
|
+
# (explicit historical preference, not the "default" placeholder).
|
|
153
190
|
if profile is None and state.state.last_profile:
|
|
154
191
|
effective_profile = state.state.last_profile
|
|
155
192
|
if region is None and state.state.last_region:
|
|
@@ -194,7 +231,9 @@ class GlobalContext:
|
|
|
194
231
|
Dict suitable for display or JSON output
|
|
195
232
|
"""
|
|
196
233
|
return {
|
|
197
|
-
"
|
|
234
|
+
# Display-normalized: None ("not specified") must never leak
|
|
235
|
+
# to the user as the literal text "None".
|
|
236
|
+
"profile": self.profile or "default",
|
|
198
237
|
"region": self.region,
|
|
199
238
|
"output_format": self.output.format.value,
|
|
200
239
|
"verbose": self.output.verbose,
|
|
@@ -80,10 +80,19 @@ class DefaultResourceFilter(BaseCodifyTransformer):
|
|
|
80
80
|
# about appears). Follow-up (out of scope here): generate the
|
|
81
81
|
# aws_appautoscaling_target/policy resources that actually own this
|
|
82
82
|
# behavior so the scaling policy itself is codified.
|
|
83
|
+
# 2026-08-10: extended to aws_rds_cluster_instance — the real-world
|
|
84
|
+
# shape of dogfood #4 was Aurora *cluster members* autoscaled by
|
|
85
|
+
# AppAutoScaling (see docs/plans/2026-08-10-aurora-cluster-design.md
|
|
86
|
+
# §4), not standalone aws_db_instance. The detection function itself
|
|
87
|
+
# is type-agnostic (tag/id-prefix based), so the same check applies.
|
|
83
88
|
(
|
|
84
89
|
"aws_db_instance",
|
|
85
90
|
lambda r: _is_appautoscaling_managed_db_instance(r),
|
|
86
91
|
),
|
|
92
|
+
(
|
|
93
|
+
"aws_rds_cluster_instance",
|
|
94
|
+
lambda r: _is_appautoscaling_managed_db_instance(r),
|
|
95
|
+
),
|
|
87
96
|
]
|
|
88
97
|
|
|
89
98
|
def __init__(self, skip_defaults: bool = True) -> None:
|
|
@@ -142,6 +142,20 @@ class ImportIDResolver(BaseCodifyTransformer):
|
|
|
142
142
|
return (
|
|
143
143
|
config.get("DBClusterIdentifier")
|
|
144
144
|
or config.get("db_cluster_identifier")
|
|
145
|
+
or config.get("cluster_identifier")
|
|
146
|
+
or resource.id
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
# RDS cluster instance: use DB instance identifier (same rule as
|
|
150
|
+
# aws_db_instance — NOT the cluster identifier). resource.id is
|
|
151
|
+
# already the DBInstanceIdentifier (see rds_scanner.py), so this is
|
|
152
|
+
# mostly explicit-for-clarity; falls through to "return resource.id"
|
|
153
|
+
# at the bottom of this method either way.
|
|
154
|
+
if tf_type == "aws_rds_cluster_instance":
|
|
155
|
+
return (
|
|
156
|
+
config.get("DBInstanceIdentifier")
|
|
157
|
+
or config.get("db_instance_identifier")
|
|
158
|
+
or config.get("identifier")
|
|
145
159
|
or resource.id
|
|
146
160
|
)
|
|
147
161
|
|
|
@@ -76,6 +76,15 @@ SAFE_FIELD_PATTERNS = [
|
|
|
76
76
|
r"^.*_ids$", # Generic *_ids pattern
|
|
77
77
|
r"^.*_arn$", # Generic *_arn pattern
|
|
78
78
|
r"^.*_arns$", # Generic *_arns pattern (plural)
|
|
79
|
+
# 2026-08: aws_rds_cluster_instance.cluster_identifier is a reference to
|
|
80
|
+
# its owning aws_rds_cluster (see
|
|
81
|
+
# docs/plans/2026-08-10-aurora-cluster-design.md §4). Deliberately a
|
|
82
|
+
# literal match, NOT a generic "^.*_identifier$" pattern: ASG's
|
|
83
|
+
# vpc_zone_identifier (a list of subnet IDs) would also match a generic
|
|
84
|
+
# suffix pattern, which is an unrelated, unreviewed behavior change
|
|
85
|
+
# outside this task's scope (see FIELD_SUFFIX_RE below for why it's
|
|
86
|
+
# safe to broaden that side).
|
|
87
|
+
r"^cluster_identifier$",
|
|
79
88
|
]
|
|
80
89
|
|
|
81
90
|
# Patterns for fields that should NEVER be modified
|
|
@@ -137,8 +146,13 @@ FIELD_STEM_ALIASES: dict[str, tuple[str, ...]] = {
|
|
|
137
146
|
"vpc_security_group": ("aws_security_group",),
|
|
138
147
|
}
|
|
139
148
|
|
|
140
|
-
# Suffixes stripped from a field name to obtain its semantic stem
|
|
141
|
-
|
|
149
|
+
# Suffixes stripped from a field name to obtain its semantic stem.
|
|
150
|
+
# 2026-08: added "identifier" so cluster_identifier -> stem "cluster",
|
|
151
|
+
# matching aws_rds_cluster (docs/plans/2026-08-10-aurora-cluster-design.md
|
|
152
|
+
# §4). Only reachable for fields that already passed SAFE_FIELD_PATTERNS
|
|
153
|
+
# above, which restricts "*_identifier" to the literal "cluster_identifier"
|
|
154
|
+
# — so this doesn't reopen the vpc_zone_identifier gap.
|
|
155
|
+
FIELD_SUFFIX_RE = re.compile(r"_(id|ids|arn|arns|name|names|identifier)$")
|
|
142
156
|
|
|
143
157
|
# Patterns to identify AWS resource IDs (for ghost reference detection)
|
|
144
158
|
AWS_ID_PATTERNS = [
|
|
@@ -201,7 +201,22 @@ class GlobalContext:
|
|
|
201
201
|
config_path=ctx.config_path,
|
|
202
202
|
)
|
|
203
203
|
|
|
204
|
-
# Resolve profile
|
|
204
|
+
# Resolve profile.
|
|
205
|
+
#
|
|
206
|
+
# dogfood #6: a bare `ConfigValue(resolved or "default", source)`
|
|
207
|
+
# here used to always store the literal string "default" when
|
|
208
|
+
# nothing (CLI/env/config) specified a profile, because
|
|
209
|
+
# ConfigManager.get("profile") falls through to its own
|
|
210
|
+
# hardcoded "default". That value fed straight into
|
|
211
|
+
# boto3.Session(profile_name="default") (core/identity.py),
|
|
212
|
+
# which SKIPS the AWS_ACCESS_KEY_ID/SECRET/SESSION_TOKEN env-var
|
|
213
|
+
# credential chain — breaking aws-vault / CI env-cred workflows.
|
|
214
|
+
#
|
|
215
|
+
# Fix: only store a value when it came from an explicit source
|
|
216
|
+
# (CLI/env/config file). When ConfigManager had nothing but its
|
|
217
|
+
# own hardcoded default to fall back on, store None so identity
|
|
218
|
+
# resolution passes profile_name=None to boto3 and lets its full
|
|
219
|
+
# default chain (env vars -> shared config -> SSO -> IMDS) run.
|
|
205
220
|
if profile:
|
|
206
221
|
ctx.profile = ConfigValue(profile, ConfigSource.CLI)
|
|
207
222
|
elif os.environ.get("AWS_PROFILE"):
|
|
@@ -211,7 +226,10 @@ class GlobalContext:
|
|
|
211
226
|
else:
|
|
212
227
|
resolved = ctx._config_manager.get("profile")
|
|
213
228
|
source = cls._determine_source(ctx._config_manager, "profile")
|
|
214
|
-
|
|
229
|
+
if source == ConfigSource.DEFAULT:
|
|
230
|
+
ctx.profile = ConfigValue(None, source)
|
|
231
|
+
else:
|
|
232
|
+
ctx.profile = ConfigValue(resolved or "default", source)
|
|
215
233
|
|
|
216
234
|
# Resolve region
|
|
217
235
|
if region:
|
|
@@ -288,7 +306,9 @@ class GlobalContext:
|
|
|
288
306
|
def to_dict(self) -> dict[str, Any]:
|
|
289
307
|
"""Convert context to dictionary for serialization."""
|
|
290
308
|
return {
|
|
291
|
-
"
|
|
309
|
+
# Display-normalized: None ("not specified") must never leak
|
|
310
|
+
# to the user as the literal text "None".
|
|
311
|
+
"profile": self.profile.value or "default",
|
|
292
312
|
"profile_source": self.profile.source.value,
|
|
293
313
|
"region": self.region.value,
|
|
294
314
|
"region_source": self.region.source.value,
|
|
@@ -12,6 +12,8 @@ import logging
|
|
|
12
12
|
from dataclasses import dataclass, field
|
|
13
13
|
from typing import TYPE_CHECKING
|
|
14
14
|
|
|
15
|
+
from replimap.core.type_aliases import expand_types
|
|
16
|
+
|
|
15
17
|
if TYPE_CHECKING:
|
|
16
18
|
from replimap.core.graph_engine import GraphEngine
|
|
17
19
|
from replimap.core.models import ResourceNode
|
|
@@ -232,15 +234,25 @@ class ScanFilter:
|
|
|
232
234
|
Args:
|
|
233
235
|
vpc: Comma-separated VPC IDs
|
|
234
236
|
vpc_name: VPC name pattern (supports wildcards)
|
|
235
|
-
types: Comma-separated resource types
|
|
237
|
+
types: Comma-separated resource types or service aliases
|
|
238
|
+
(e.g. "rds", "ec2" — see replimap.core.type_aliases).
|
|
239
|
+
Expanded to full Terraform types before storing, so
|
|
240
|
+
`should_include_resource` never has to reason about
|
|
241
|
+
aliases.
|
|
236
242
|
tags: List of "Key=Value" tag filters
|
|
237
|
-
exclude_types: Comma-separated types to exclude
|
|
243
|
+
exclude_types: Comma-separated types/aliases to exclude
|
|
238
244
|
exclude_tags: List of "Key=Value" tags to exclude
|
|
239
245
|
name_pattern: Resource name pattern (supports wildcards)
|
|
240
246
|
exclude_pattern: Name pattern to exclude
|
|
241
247
|
|
|
242
248
|
Returns:
|
|
243
249
|
Configured ScanFilter instance
|
|
250
|
+
|
|
251
|
+
Raises:
|
|
252
|
+
UnknownResourceTypeError: `types` or `exclude_types` contains a
|
|
253
|
+
token that isn't a known alias or literal resource type
|
|
254
|
+
(dogfood #7: silently matching nothing is worse than
|
|
255
|
+
failing loudly).
|
|
244
256
|
"""
|
|
245
257
|
filter_obj = cls()
|
|
246
258
|
|
|
@@ -251,7 +263,7 @@ class ScanFilter:
|
|
|
251
263
|
filter_obj.vpc_names = [v.strip() for v in vpc_name.split(",")]
|
|
252
264
|
|
|
253
265
|
if types:
|
|
254
|
-
filter_obj.resource_types =
|
|
266
|
+
filter_obj.resource_types = sorted(expand_types(types.split(",")))
|
|
255
267
|
|
|
256
268
|
if tags:
|
|
257
269
|
for tag in tags:
|
|
@@ -260,9 +272,7 @@ class ScanFilter:
|
|
|
260
272
|
filter_obj.include_tags[key.strip()] = value.strip()
|
|
261
273
|
|
|
262
274
|
if exclude_types:
|
|
263
|
-
filter_obj.exclude_types =
|
|
264
|
-
t.strip().lower() for t in exclude_types.split(",")
|
|
265
|
-
]
|
|
275
|
+
filter_obj.exclude_types = sorted(expand_types(exclude_types.split(",")))
|
|
266
276
|
|
|
267
277
|
if exclude_tags:
|
|
268
278
|
for tag in exclude_tags:
|
|
@@ -346,12 +356,28 @@ def apply_filter_to_graph(
|
|
|
346
356
|
resources_to_keep.update(dependencies_to_keep)
|
|
347
357
|
resources_to_remove -= dependencies_to_keep
|
|
348
358
|
|
|
349
|
-
# Remove resources
|
|
359
|
+
# Remove resources.
|
|
360
|
+
#
|
|
361
|
+
# GraphEngineAdapter.remove_resource() returns False (with a warning
|
|
362
|
+
# logged) instead of raising when a bare id is ambiguous across
|
|
363
|
+
# multiple resource types (e.g. an IAM role and instance profile
|
|
364
|
+
# sharing a name) — a real interaction found while reproducing
|
|
365
|
+
# dogfood #3/#7: with `--types rds` matching nothing, this loop tried
|
|
366
|
+
# to remove nearly the whole graph, and the handful of ambiguous-id
|
|
367
|
+
# resources silently survived while still being counted as removed
|
|
368
|
+
# below (the `except Exception` here never fires for a normal `False`
|
|
369
|
+
# return). Checking the return value is the fix; both were flagged as
|
|
370
|
+
# "removed" and "kept" inconsistently before.
|
|
350
371
|
removed_count = 0
|
|
351
372
|
for resource_id in resources_to_remove:
|
|
352
373
|
try:
|
|
353
|
-
graph.remove_resource(resource_id)
|
|
354
|
-
|
|
374
|
+
if graph.remove_resource(resource_id):
|
|
375
|
+
removed_count += 1
|
|
376
|
+
else:
|
|
377
|
+
logger.warning(
|
|
378
|
+
f"Could not remove resource {resource_id}: "
|
|
379
|
+
"id is ambiguous across multiple types (survives the filter)"
|
|
380
|
+
)
|
|
355
381
|
except Exception as e:
|
|
356
382
|
logger.warning(f"Failed to remove resource {resource_id}: {e}")
|
|
357
383
|
|