runbooks 1.1.9__py3-none-any.whl → 1.1.10__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.
Files changed (107) hide show
  1. runbooks/__init__.py +1 -1
  2. runbooks/__init___optimized.py +2 -1
  3. runbooks/_platform/__init__.py +1 -1
  4. runbooks/cfat/cli.py +4 -3
  5. runbooks/cfat/cloud_foundations_assessment.py +1 -2
  6. runbooks/cfat/tests/test_cli.py +4 -1
  7. runbooks/cli/commands/finops.py +68 -19
  8. runbooks/cli/commands/inventory.py +796 -7
  9. runbooks/cli/commands/operate.py +65 -4
  10. runbooks/cloudops/cost_optimizer.py +1 -3
  11. runbooks/common/cli_decorators.py +6 -4
  12. runbooks/common/config_loader.py +787 -0
  13. runbooks/common/config_schema.py +280 -0
  14. runbooks/common/dry_run_framework.py +14 -2
  15. runbooks/common/mcp_integration.py +238 -0
  16. runbooks/finops/ebs_cost_optimizer.py +7 -4
  17. runbooks/finops/elastic_ip_optimizer.py +7 -4
  18. runbooks/finops/infrastructure/__init__.py +3 -2
  19. runbooks/finops/infrastructure/commands.py +7 -4
  20. runbooks/finops/infrastructure/load_balancer_optimizer.py +7 -4
  21. runbooks/finops/infrastructure/vpc_endpoint_optimizer.py +7 -4
  22. runbooks/finops/nat_gateway_optimizer.py +7 -4
  23. runbooks/finops/tests/run_tests.py +1 -1
  24. runbooks/inventory/ArgumentsClass.py +2 -1
  25. runbooks/inventory/README.md +111 -12
  26. runbooks/inventory/Tests/test_Inventory_Modules.py +27 -10
  27. runbooks/inventory/Tests/test_cfn_describe_stacks.py +18 -7
  28. runbooks/inventory/Tests/test_ec2_describe_instances.py +30 -15
  29. runbooks/inventory/Tests/test_lambda_list_functions.py +17 -3
  30. runbooks/inventory/Tests/test_org_list_accounts.py +17 -4
  31. runbooks/inventory/account_class.py +0 -1
  32. runbooks/inventory/all_my_instances_wrapper.py +4 -8
  33. runbooks/inventory/aws_organization.png +0 -0
  34. runbooks/inventory/check_cloudtrail_compliance.py +4 -4
  35. runbooks/inventory/check_controltower_readiness.py +50 -47
  36. runbooks/inventory/check_landingzone_readiness.py +35 -31
  37. runbooks/inventory/cloud_foundations_integration.py +8 -3
  38. runbooks/inventory/core/collector.py +201 -1
  39. runbooks/inventory/discovery.md +2 -1
  40. runbooks/inventory/{draw_org_structure.py → draw_org.py} +55 -9
  41. runbooks/inventory/drift_detection_cli.py +8 -68
  42. runbooks/inventory/find_cfn_drift_detection.py +14 -4
  43. runbooks/inventory/find_cfn_orphaned_stacks.py +7 -5
  44. runbooks/inventory/find_cfn_stackset_drift.py +5 -5
  45. runbooks/inventory/find_ec2_security_groups.py +6 -3
  46. runbooks/inventory/find_landingzone_versions.py +5 -5
  47. runbooks/inventory/find_vpc_flow_logs.py +5 -5
  48. runbooks/inventory/inventory.sh +20 -7
  49. runbooks/inventory/inventory_mcp_cli.py +4 -0
  50. runbooks/inventory/inventory_modules.py +9 -7
  51. runbooks/inventory/list_cfn_stacks.py +18 -8
  52. runbooks/inventory/list_cfn_stackset_operation_results.py +2 -2
  53. runbooks/inventory/list_cfn_stackset_operations.py +32 -20
  54. runbooks/inventory/list_cfn_stacksets.py +7 -4
  55. runbooks/inventory/list_config_recorders_delivery_channels.py +4 -4
  56. runbooks/inventory/list_ds_directories.py +3 -3
  57. runbooks/inventory/list_ec2_availability_zones.py +7 -3
  58. runbooks/inventory/list_ec2_ebs_volumes.py +3 -3
  59. runbooks/inventory/list_ec2_instances.py +1 -1
  60. runbooks/inventory/list_ecs_clusters_and_tasks.py +8 -4
  61. runbooks/inventory/list_elbs_load_balancers.py +7 -3
  62. runbooks/inventory/list_enis_network_interfaces.py +3 -3
  63. runbooks/inventory/list_guardduty_detectors.py +9 -5
  64. runbooks/inventory/list_iam_policies.py +7 -3
  65. runbooks/inventory/list_iam_roles.py +3 -3
  66. runbooks/inventory/list_iam_saml_providers.py +8 -4
  67. runbooks/inventory/list_lambda_functions.py +8 -4
  68. runbooks/inventory/list_org_accounts.py +306 -276
  69. runbooks/inventory/list_org_accounts_users.py +45 -9
  70. runbooks/inventory/list_rds_db_instances.py +4 -4
  71. runbooks/inventory/list_route53_hosted_zones.py +3 -3
  72. runbooks/inventory/list_servicecatalog_provisioned_products.py +5 -5
  73. runbooks/inventory/list_sns_topics.py +4 -4
  74. runbooks/inventory/list_ssm_parameters.py +6 -3
  75. runbooks/inventory/list_vpc_subnets.py +8 -4
  76. runbooks/inventory/list_vpcs.py +15 -4
  77. runbooks/inventory/mcp_vpc_validator.py +6 -0
  78. runbooks/inventory/organizations_discovery.py +17 -3
  79. runbooks/inventory/organizations_utils.py +553 -0
  80. runbooks/inventory/output_formatters.py +422 -0
  81. runbooks/inventory/recover_cfn_stack_ids.py +5 -5
  82. runbooks/inventory/run_on_multi_accounts.py +3 -3
  83. runbooks/inventory/tag_coverage.py +481 -0
  84. runbooks/inventory/validation_utils.py +358 -0
  85. runbooks/inventory/verify_ec2_security_groups.py +18 -5
  86. runbooks/inventory/vpc_architecture_validator.py +7 -1
  87. runbooks/inventory/vpc_dependency_analyzer.py +6 -0
  88. runbooks/main_final.py +2 -2
  89. runbooks/main_ultra_minimal.py +2 -2
  90. runbooks/mcp/integration.py +6 -4
  91. runbooks/remediation/acm_remediation.py +2 -2
  92. runbooks/remediation/cloudtrail_remediation.py +2 -2
  93. runbooks/remediation/cognito_remediation.py +2 -2
  94. runbooks/remediation/dynamodb_remediation.py +2 -2
  95. runbooks/remediation/ec2_remediation.py +2 -2
  96. runbooks/remediation/kms_remediation.py +2 -2
  97. runbooks/remediation/lambda_remediation.py +2 -2
  98. runbooks/remediation/rds_remediation.py +2 -2
  99. runbooks/remediation/s3_remediation.py +1 -1
  100. runbooks/vpc/cloudtrail_audit_integration.py +1 -1
  101. {runbooks-1.1.9.dist-info → runbooks-1.1.10.dist-info}/METADATA +74 -4
  102. {runbooks-1.1.9.dist-info → runbooks-1.1.10.dist-info}/RECORD +106 -100
  103. runbooks/__init__.py.backup +0 -134
  104. {runbooks-1.1.9.dist-info → runbooks-1.1.10.dist-info}/WHEEL +0 -0
  105. {runbooks-1.1.9.dist-info → runbooks-1.1.10.dist-info}/entry_points.txt +0 -0
  106. {runbooks-1.1.9.dist-info → runbooks-1.1.10.dist-info}/licenses/LICENSE +0 -0
  107. {runbooks-1.1.9.dist-info → runbooks-1.1.10.dist-info}/top_level.txt +0 -0
@@ -1,134 +0,0 @@
1
- """
2
- CloudOps Runbooks - Enterprise AWS Automation & Cloud Foundations Toolkit
3
-
4
- A comprehensive enterprise-grade automation platform for AWS cloud operations,
5
- designed for CloudOps, DevOps, and SRE teams managing multi-account environments.
6
-
7
- ## Core Capabilities
8
-
9
- ### 🔍 Discovery & Assessment
10
- - **Cloud Foundations Assessment Tool (CFAT)**: Automated AWS environment discovery
11
- and best practices assessment with actionable remediation guidance
12
- - **Multi-Account Inventory**: Comprehensive resource discovery across AWS Organizations
13
- - **Security Baseline Assessment**: Automated security posture evaluation
14
- - **Cost & Financial Operations**: Resource utilization and cost optimization analysis
15
-
16
- ### ⚙️ Operations & Automation
17
- - **AWS Resource Operations**: Enterprise-grade EC2, S3, DynamoDB management
18
- - **Organization Management**: AWS Organizations structure and account automation
19
- - **Identity & Access Management**: Cross-account IAM role and policy management
20
- - **Infrastructure Automation**: CloudFormation, networking, and compliance operations
21
-
22
- ### 🏛️ Enterprise Features
23
- - **Multi-Deployment Support**: CLI, Docker, AWS Lambda, Kubernetes ready
24
- - **Environment Configuration**: Comprehensive environment variable support
25
- - **Monitoring & Notifications**: SNS integration and operational awareness
26
- - **KISS Architecture**: Simple, maintainable, no-legacy-complexity design
27
-
28
- ## Documentation
29
-
30
- For comprehensive documentation, examples, and best practices:
31
- https://cloudops.oceansoft.io/cloud-foundation/cfat-assessment-tool.html
32
-
33
- ## Quick Start
34
-
35
- ```python
36
- # Assessment and Discovery
37
- from runbooks.cfat import AssessmentRunner
38
- from runbooks.inventory import InventoryCollector
39
- from runbooks.security import SecurityBaselineTester
40
-
41
- # Operations and Automation
42
- from runbooks.operate import EC2Operations, S3Operations, DynamoDBOperations
43
-
44
- # Assessment
45
- runner = AssessmentRunner()
46
- results = runner.run_assessment()
47
-
48
- # Resource Operations
49
- ec2_ops = EC2Operations()
50
- s3_ops = S3Operations()
51
- ```
52
-
53
- ## Target Audience
54
-
55
- - **CloudOps Engineers**: Multi-account AWS environment management
56
- - **DevOps Teams**: Infrastructure automation and CI/CD integration
57
- - **Site Reliability Engineers (SRE)**: Operational excellence and monitoring
58
- - **Security Engineers**: Compliance assessment and remediation
59
- - **FinOps Practitioners**: Cost optimization and resource governance
60
- """
61
-
62
- # Centralized Version Management - Single Source of Truth
63
- # All modules MUST import __version__ from this location
64
- __version__ = "1.0.0"
65
-
66
- # Fallback for legacy importlib.metadata usage during transition
67
- try:
68
- from importlib.metadata import version as _pkg_version
69
- _metadata_version = _pkg_version("runbooks")
70
- if _metadata_version != __version__:
71
- import warnings
72
- warnings.warn(
73
- f"Version mismatch detected: pyproject.toml has {_metadata_version}, "
74
- f"but centralized version is {__version__}. Please sync pyproject.toml.",
75
- UserWarning
76
- )
77
- except Exception:
78
- # Expected during development or when package metadata is unavailable
79
- pass
80
-
81
- # Core module exports
82
- from runbooks.config import RunbooksConfig, load_config, save_config
83
- from runbooks.utils import ensure_directory, setup_logging, validate_aws_profile
84
-
85
- # Enterprise module exports with graceful degradation
86
- try:
87
- # Assessment and Discovery
88
- from runbooks.cfat.runner import AssessmentRunner
89
- from runbooks.inventory.collectors.aws_management import OrganizationsManager
90
- from runbooks.inventory.core.collector import InventoryCollector
91
- from runbooks.operate.cloudformation_operations import CloudFormationOperations
92
- from runbooks.operate.cloudwatch_operations import CloudWatchOperations
93
- from runbooks.operate.dynamodb_operations import DynamoDBOperations
94
-
95
- # Operations and Automation
96
- from runbooks.operate.ec2_operations import EC2Operations
97
- from runbooks.operate.iam_operations import IAMOperations
98
- from runbooks.operate.s3_operations import S3Operations
99
- from runbooks.security.security_baseline_tester import SecurityBaselineTester
100
-
101
- _enterprise_exports = [
102
- "AssessmentRunner",
103
- "InventoryCollector",
104
- "OrganizationsManager",
105
- "SecurityBaselineTester",
106
- "EC2Operations",
107
- "S3Operations",
108
- "DynamoDBOperations",
109
- "CloudFormationOperations",
110
- "IAMOperations",
111
- "CloudWatchOperations",
112
- ]
113
- except ImportError as e:
114
- # Graceful degradation if enterprise dependencies aren't available
115
- _enterprise_exports = []
116
-
117
- # FinOps exports
118
- from runbooks.finops import get_cost_data, get_trend, run_dashboard
119
-
120
- # Consolidated exports for enterprise CloudOps platform
121
- __all__ = [
122
- # Core utilities
123
- "__version__",
124
- "setup_logging",
125
- "load_config",
126
- "save_config",
127
- "RunbooksConfig",
128
- "ensure_directory",
129
- "validate_aws_profile",
130
- # FinOps capabilities
131
- "run_dashboard",
132
- "get_cost_data",
133
- "get_trend",
134
- ] + _enterprise_exports