cdk-cost-analyzer 0.1.1
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.
- package/.cdk-cost-analyzer-cache/metadata.json +12 -0
- package/.gitlab-ci.yml +214 -0
- package/.husky/pre-commit +12 -0
- package/.kiro/hooks/accessibility-audit.kiro.hook +18 -0
- package/.kiro/hooks/api-schema-validation.kiro.hook +21 -0
- package/.kiro/hooks/auto-test-on-save.kiro.hook +19 -0
- package/.kiro/hooks/cdk-synth-on-change.kiro.hook +20 -0
- package/.kiro/hooks/code-coverage-check.kiro.hook +14 -0
- package/.kiro/hooks/commit-message-helper.kiro.hook +14 -0
- package/.kiro/hooks/dependency-update-check.kiro.hook +14 -0
- package/.kiro/hooks/env-file-validation.kiro.hook +18 -0
- package/.kiro/hooks/lint-and-format-on-save.kiro.hook +21 -0
- package/.kiro/hooks/mcp-config-validation.kiro.hook +17 -0
- package/.kiro/hooks/mcp-server-test.kiro.hook +14 -0
- package/.kiro/hooks/performance-analysis.kiro.hook +14 -0
- package/.kiro/hooks/readme-spell-check.kiro.hook +14 -0
- package/.kiro/hooks/security-scan-on-dependency-change.kiro.hook +21 -0
- package/.kiro/hooks/translation-update.kiro.hook +18 -0
- package/.kiro/hooks/update-documentation.kiro.hook +18 -0
- package/.kiro/settings/mcp.json +20 -0
- package/.kiro/specs/cdk-cost-analyzer/design.md +620 -0
- package/.kiro/specs/cdk-cost-analyzer/requirements.md +183 -0
- package/.kiro/specs/cdk-cost-analyzer/tasks.md +357 -0
- package/.kiro/specs/github-actions-ci/design.md +281 -0
- package/.kiro/specs/github-actions-ci/requirements.md +86 -0
- package/.kiro/specs/github-actions-ci/tasks.md +115 -0
- package/.kiro/specs/nlb-calculator-test-coverage/design.md +190 -0
- package/.kiro/specs/nlb-calculator-test-coverage/requirements.md +84 -0
- package/.kiro/specs/nlb-calculator-test-coverage/tasks.md +150 -0
- package/.kiro/specs/production-readiness/design.md +1213 -0
- package/.kiro/specs/production-readiness/requirements.md +312 -0
- package/.kiro/specs/production-readiness/tasks.md +269 -0
- package/.kiro/specs/repository-cleanup/design.md +283 -0
- package/.kiro/specs/repository-cleanup/requirements.md +74 -0
- package/.kiro/specs/repository-cleanup/tasks.md +64 -0
- package/.kiro/steering/aws-cli-best-practices.md +41 -0
- package/.kiro/steering/cdk-best-practices.md +49 -0
- package/.kiro/steering/development-standards.md +54 -0
- package/.kiro/steering/docker-best-practices.md +34 -0
- package/.kiro/steering/documentation-style.md +151 -0
- package/.kiro/steering/git-best-practices.md +37 -0
- package/.kiro/steering/mcp-best-practices.md +95 -0
- package/.kiro/steering/python-best-practices.md +48 -0
- package/.kiro/steering/react-best-practices.md +44 -0
- package/.kiro/steering/security-best-practices.md +41 -0
- package/.kiro/steering/testing-best-practices.md +59 -0
- package/.kiro/steering/typescript-best-practices.md +40 -0
- package/CHANGELOG.md +49 -0
- package/CONTRIBUTING.md +258 -0
- package/LICENSE +19 -0
- package/README.md +480 -0
- package/SECURITY.md +117 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/index.js +65 -0
- package/dist/api/types.d.ts +15 -0
- package/dist/api/types.js +3 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +262 -0
- package/dist/config/ConfigManager.d.ts +40 -0
- package/dist/config/ConfigManager.js +238 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +19 -0
- package/dist/config/types.d.ts +72 -0
- package/dist/config/types.js +15 -0
- package/dist/diff/DiffEngine.d.ts +7 -0
- package/dist/diff/DiffEngine.js +73 -0
- package/dist/diff/index.d.ts +2 -0
- package/dist/diff/index.js +21 -0
- package/dist/diff/types.d.ts +20 -0
- package/dist/diff/types.js +3 -0
- package/dist/integrations/GitLabIntegration.d.ts +7 -0
- package/dist/integrations/GitLabIntegration.js +45 -0
- package/dist/integrations/index.d.ts +2 -0
- package/dist/integrations/index.js +21 -0
- package/dist/integrations/types.d.ts +11 -0
- package/dist/integrations/types.js +13 -0
- package/dist/parser/TemplateParser.d.ts +8 -0
- package/dist/parser/TemplateParser.js +75 -0
- package/dist/parser/index.d.ts +2 -0
- package/dist/parser/index.js +22 -0
- package/dist/parser/types.d.ts +30 -0
- package/dist/parser/types.js +3 -0
- package/dist/pipeline/PipelineOrchestrator.d.ts +23 -0
- package/dist/pipeline/PipelineOrchestrator.js +191 -0
- package/dist/pipeline/index.d.ts +2 -0
- package/dist/pipeline/index.js +19 -0
- package/dist/pipeline/types.d.ts +41 -0
- package/dist/pipeline/types.js +13 -0
- package/dist/pricing/CacheManager.d.ts +75 -0
- package/dist/pricing/CacheManager.js +195 -0
- package/dist/pricing/PricingClient.d.ts +17 -0
- package/dist/pricing/PricingClient.js +122 -0
- package/dist/pricing/PricingService.d.ts +16 -0
- package/dist/pricing/PricingService.js +149 -0
- package/dist/pricing/calculators/ALBCalculator.d.ts +16 -0
- package/dist/pricing/calculators/ALBCalculator.js +163 -0
- package/dist/pricing/calculators/APIGatewayCalculator.d.ts +10 -0
- package/dist/pricing/calculators/APIGatewayCalculator.js +177 -0
- package/dist/pricing/calculators/CloudFrontCalculator.d.ts +59 -0
- package/dist/pricing/calculators/CloudFrontCalculator.js +151 -0
- package/dist/pricing/calculators/DynamoDBCalculator.d.ts +9 -0
- package/dist/pricing/calculators/DynamoDBCalculator.js +146 -0
- package/dist/pricing/calculators/EC2Calculator.d.ts +7 -0
- package/dist/pricing/calculators/EC2Calculator.js +80 -0
- package/dist/pricing/calculators/ECSCalculator.d.ts +9 -0
- package/dist/pricing/calculators/ECSCalculator.js +116 -0
- package/dist/pricing/calculators/ElastiCacheCalculator.d.ts +8 -0
- package/dist/pricing/calculators/ElastiCacheCalculator.js +106 -0
- package/dist/pricing/calculators/LambdaCalculator.d.ts +13 -0
- package/dist/pricing/calculators/LambdaCalculator.js +111 -0
- package/dist/pricing/calculators/NLBCalculator.d.ts +16 -0
- package/dist/pricing/calculators/NLBCalculator.js +138 -0
- package/dist/pricing/calculators/NatGatewayCalculator.d.ts +12 -0
- package/dist/pricing/calculators/NatGatewayCalculator.js +116 -0
- package/dist/pricing/calculators/RDSCalculator.d.ts +9 -0
- package/dist/pricing/calculators/RDSCalculator.js +103 -0
- package/dist/pricing/calculators/S3Calculator.d.ts +8 -0
- package/dist/pricing/calculators/S3Calculator.js +68 -0
- package/dist/pricing/calculators/VPCEndpointCalculator.d.ts +12 -0
- package/dist/pricing/calculators/VPCEndpointCalculator.js +129 -0
- package/dist/pricing/index.d.ts +10 -0
- package/dist/pricing/index.js +37 -0
- package/dist/pricing/types.d.ts +53 -0
- package/dist/pricing/types.js +22 -0
- package/dist/releasetag.txt +1 -0
- package/dist/reporter/Reporter.d.ts +18 -0
- package/dist/reporter/Reporter.js +412 -0
- package/dist/reporter/index.d.ts +2 -0
- package/dist/reporter/index.js +21 -0
- package/dist/reporter/types.d.ts +72 -0
- package/dist/reporter/types.js +3 -0
- package/dist/synthesis/SynthesisOrchestrator.d.ts +26 -0
- package/dist/synthesis/SynthesisOrchestrator.js +243 -0
- package/dist/synthesis/index.d.ts +2 -0
- package/dist/synthesis/index.js +19 -0
- package/dist/synthesis/types.d.ts +17 -0
- package/dist/synthesis/types.js +13 -0
- package/dist/threshold/ThresholdEnforcer.d.ts +29 -0
- package/dist/threshold/ThresholdEnforcer.js +143 -0
- package/dist/threshold/index.d.ts +2 -0
- package/dist/threshold/index.js +19 -0
- package/dist/threshold/types.d.ts +15 -0
- package/dist/threshold/types.js +17 -0
- package/docs/CALCULATORS.md +820 -0
- package/docs/CI_CD.md +608 -0
- package/docs/CONFIGURATION.md +407 -0
- package/docs/DEVELOPMENT.md +387 -0
- package/docs/RELEASE.md +223 -0
- package/docs/TROUBLESHOOTING.md +847 -0
- package/examples/.cdk-cost-analyzer.yml +85 -0
- package/examples/.gitlab-ci.yml +125 -0
- package/examples/api-usage.js +26 -0
- package/examples/complex/base.json +16 -0
- package/examples/complex/target.json +29 -0
- package/examples/monorepo/.gitlab-ci.yml +251 -0
- package/examples/monorepo/README.md +341 -0
- package/examples/monorepo/package.json +27 -0
- package/examples/monorepo/packages/backend-infra/.cdk-cost-analyzer.yml +34 -0
- package/examples/monorepo/packages/backend-infra/bin/app.ts +16 -0
- package/examples/monorepo/packages/backend-infra/cdk.json +7 -0
- package/examples/monorepo/packages/backend-infra/lib/backend-stack.ts +128 -0
- package/examples/monorepo/packages/backend-infra/package.json +30 -0
- package/examples/monorepo/packages/backend-infra/tsconfig.json +11 -0
- package/examples/monorepo/packages/data-infra/.cdk-cost-analyzer.yml +38 -0
- package/examples/monorepo/packages/data-infra/bin/app.ts +16 -0
- package/examples/monorepo/packages/data-infra/cdk.json +7 -0
- package/examples/monorepo/packages/data-infra/lib/data-stack.ts +121 -0
- package/examples/monorepo/packages/data-infra/package.json +30 -0
- package/examples/monorepo/packages/data-infra/tsconfig.json +11 -0
- package/examples/monorepo/packages/frontend-infra/.cdk-cost-analyzer.yml +31 -0
- package/examples/monorepo/packages/frontend-infra/bin/app.ts +16 -0
- package/examples/monorepo/packages/frontend-infra/cdk.json +7 -0
- package/examples/monorepo/packages/frontend-infra/lib/frontend-stack.ts +60 -0
- package/examples/monorepo/packages/frontend-infra/package.json +30 -0
- package/examples/monorepo/packages/frontend-infra/tsconfig.json +11 -0
- package/examples/monorepo/tsconfig.json +35 -0
- package/examples/multi-stack/.cdk-cost-analyzer.yml +72 -0
- package/examples/multi-stack/.gitlab-ci.yml +184 -0
- package/examples/multi-stack/README.md +279 -0
- package/examples/multi-stack/bin/app.ts +36 -0
- package/examples/multi-stack/cdk.json +72 -0
- package/examples/multi-stack/lib/compute-stack.ts +128 -0
- package/examples/multi-stack/lib/networking-stack.ts +69 -0
- package/examples/multi-stack/lib/storage-stack.ts +141 -0
- package/examples/multi-stack/package-lock.json +4437 -0
- package/examples/multi-stack/package.json +42 -0
- package/examples/multi-stack/tsconfig.json +34 -0
- package/examples/simple/base.json +8 -0
- package/examples/simple/target.json +14 -0
- package/examples/single-stack/.NVP +0 -0
- package/examples/single-stack/.cdk-cost-analyzer.yml +52 -0
- package/examples/single-stack/.gitlab-ci.yml +126 -0
- package/examples/single-stack/README.md +184 -0
- package/examples/single-stack/UeK +0 -0
- package/examples/single-stack/bin/app.ts +16 -0
- package/examples/single-stack/cdk.json +72 -0
- package/examples/single-stack/lib/infrastructure-stack.ts +119 -0
- package/examples/single-stack/package-lock.json +4443 -0
- package/examples/single-stack/package.json +38 -0
- package/examples/single-stack/tsconfig.json +34 -0
- package/package.json +139 -0
- package/test-cdk-project/README-COMPUTE.md +141 -0
- package/test-cdk-project/README.md +95 -0
- package/test-cdk-project/app-with-compute.js +102 -0
- package/test-cdk-project/app.js +81 -0
- package/test-cdk-project/cdk-compute.json +3 -0
- package/test-cdk-project/cdk.context.json +7 -0
- package/test-cdk-project/cdk.json +3 -0
- package/test-cdk-project/cdk.out/TestStack.assets.json +21 -0
- package/test-cdk-project/cdk.out/TestStack.template.json +115 -0
- package/test-cdk-project/cdk.out/cdk.out +1 -0
- package/test-cdk-project/cdk.out/manifest.json +503 -0
- package/test-cdk-project/cdk.out/tree.json +1 -0
- package/test-cdk-project/cdk.out.base/TestStack.assets.json +21 -0
- package/test-cdk-project/cdk.out.base/TestStack.template.json +115 -0
- package/test-cdk-project/cdk.out.base/cdk.out +1 -0
- package/test-cdk-project/cdk.out.base/manifest.json +503 -0
- package/test-cdk-project/cdk.out.base/tree.json +1 -0
- package/test-cdk-project/cdk.out.target/TestStack.assets.json +21 -0
- package/test-cdk-project/cdk.out.target/TestStack.template.json +183 -0
- package/test-cdk-project/cdk.out.target/cdk.out +1 -0
- package/test-cdk-project/cdk.out.target/manifest.json +521 -0
- package/test-cdk-project/cdk.out.target/tree.json +1 -0
- package/test-cdk-project/package-lock.json +422 -0
- package/test-cdk-project/package.json +17 -0
- package/tools/workflows/README.md +102 -0
- package/tools/workflows/validate-workflows.js +109 -0
- package/tools/workflows/workflow-utils.ts +181 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Resources": {
|
|
3
|
+
"MyBucketF68F3FF0": {
|
|
4
|
+
"Type": "AWS::S3::Bucket",
|
|
5
|
+
"Properties": {
|
|
6
|
+
"BucketName": "my-test-bucket-base"
|
|
7
|
+
},
|
|
8
|
+
"UpdateReplacePolicy": "Delete",
|
|
9
|
+
"DeletionPolicy": "Delete",
|
|
10
|
+
"Metadata": {
|
|
11
|
+
"aws:cdk:path": "TestStack/MyBucket/Resource"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"MyFunctionServiceRole3C357FF2": {
|
|
15
|
+
"Type": "AWS::IAM::Role",
|
|
16
|
+
"Properties": {
|
|
17
|
+
"AssumeRolePolicyDocument": {
|
|
18
|
+
"Statement": [
|
|
19
|
+
{
|
|
20
|
+
"Action": "sts:AssumeRole",
|
|
21
|
+
"Effect": "Allow",
|
|
22
|
+
"Principal": {
|
|
23
|
+
"Service": "lambda.amazonaws.com"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"Version": "2012-10-17"
|
|
28
|
+
},
|
|
29
|
+
"ManagedPolicyArns": [
|
|
30
|
+
{
|
|
31
|
+
"Fn::Join": [
|
|
32
|
+
"",
|
|
33
|
+
[
|
|
34
|
+
"arn:",
|
|
35
|
+
{
|
|
36
|
+
"Ref": "AWS::Partition"
|
|
37
|
+
},
|
|
38
|
+
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
39
|
+
]
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"Metadata": {
|
|
45
|
+
"aws:cdk:path": "TestStack/MyFunction/ServiceRole/Resource"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"MyFunction3BAA72D1": {
|
|
49
|
+
"Type": "AWS::Lambda::Function",
|
|
50
|
+
"Properties": {
|
|
51
|
+
"Code": {
|
|
52
|
+
"ZipFile": "exports.handler = async () => ({ statusCode: 200 });"
|
|
53
|
+
},
|
|
54
|
+
"Handler": "index.handler",
|
|
55
|
+
"MemorySize": 1024,
|
|
56
|
+
"Role": {
|
|
57
|
+
"Fn::GetAtt": [
|
|
58
|
+
"MyFunctionServiceRole3C357FF2",
|
|
59
|
+
"Arn"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"Runtime": "nodejs18.x"
|
|
63
|
+
},
|
|
64
|
+
"DependsOn": [
|
|
65
|
+
"MyFunctionServiceRole3C357FF2"
|
|
66
|
+
],
|
|
67
|
+
"Metadata": {
|
|
68
|
+
"aws:cdk:path": "TestStack/MyFunction/Resource"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"MyNewFunctionServiceRole45AE070C": {
|
|
72
|
+
"Type": "AWS::IAM::Role",
|
|
73
|
+
"Properties": {
|
|
74
|
+
"AssumeRolePolicyDocument": {
|
|
75
|
+
"Statement": [
|
|
76
|
+
{
|
|
77
|
+
"Action": "sts:AssumeRole",
|
|
78
|
+
"Effect": "Allow",
|
|
79
|
+
"Principal": {
|
|
80
|
+
"Service": "lambda.amazonaws.com"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"Version": "2012-10-17"
|
|
85
|
+
},
|
|
86
|
+
"ManagedPolicyArns": [
|
|
87
|
+
{
|
|
88
|
+
"Fn::Join": [
|
|
89
|
+
"",
|
|
90
|
+
[
|
|
91
|
+
"arn:",
|
|
92
|
+
{
|
|
93
|
+
"Ref": "AWS::Partition"
|
|
94
|
+
},
|
|
95
|
+
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
96
|
+
]
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"Metadata": {
|
|
102
|
+
"aws:cdk:path": "TestStack/MyNewFunction/ServiceRole/Resource"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"MyNewFunction972C2AD3": {
|
|
106
|
+
"Type": "AWS::Lambda::Function",
|
|
107
|
+
"Properties": {
|
|
108
|
+
"Code": {
|
|
109
|
+
"ZipFile": "exports.handler = async () => ({ statusCode: 200 });"
|
|
110
|
+
},
|
|
111
|
+
"Handler": "index.handler",
|
|
112
|
+
"MemorySize": 2560,
|
|
113
|
+
"Role": {
|
|
114
|
+
"Fn::GetAtt": [
|
|
115
|
+
"MyNewFunctionServiceRole45AE070C",
|
|
116
|
+
"Arn"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"Runtime": "nodejs18.x"
|
|
120
|
+
},
|
|
121
|
+
"DependsOn": [
|
|
122
|
+
"MyNewFunctionServiceRole45AE070C"
|
|
123
|
+
],
|
|
124
|
+
"Metadata": {
|
|
125
|
+
"aws:cdk:path": "TestStack/MyNewFunction/Resource"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"MyNewBucket15CA675A": {
|
|
129
|
+
"Type": "AWS::S3::Bucket",
|
|
130
|
+
"Properties": {
|
|
131
|
+
"BucketName": "my-test-bucket-new"
|
|
132
|
+
},
|
|
133
|
+
"UpdateReplacePolicy": "Delete",
|
|
134
|
+
"DeletionPolicy": "Delete",
|
|
135
|
+
"Metadata": {
|
|
136
|
+
"aws:cdk:path": "TestStack/MyNewBucket/Resource"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"CDKMetadata": {
|
|
140
|
+
"Type": "AWS::CDK::Metadata",
|
|
141
|
+
"Properties": {
|
|
142
|
+
"Analytics": "v2:deflate64:H4sIAAAAAAAA/zWJWw7CIBAAz9L/ZbU0XkATD4AHMBTWZMsrKaAfhLsrafyayYxEucx4nvQnC2Od8LxiexRtHPzSs+UF27UaRwVur3hYB6/DajW2e42mcIrj/b0D64BNJU8jD/YOinKqu6EOMVnCLZ/e8oIS52nLzGKvsXAgVAe/L0diS5YAAAA="
|
|
143
|
+
},
|
|
144
|
+
"Metadata": {
|
|
145
|
+
"aws:cdk:path": "TestStack/CDKMetadata/Default"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"Parameters": {
|
|
150
|
+
"BootstrapVersion": {
|
|
151
|
+
"Type": "AWS::SSM::Parameter::Value<String>",
|
|
152
|
+
"Default": "/cdk-bootstrap/hnb659fds/version",
|
|
153
|
+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"Rules": {
|
|
157
|
+
"CheckBootstrapVersion": {
|
|
158
|
+
"Assertions": [
|
|
159
|
+
{
|
|
160
|
+
"Assert": {
|
|
161
|
+
"Fn::Not": [
|
|
162
|
+
{
|
|
163
|
+
"Fn::Contains": [
|
|
164
|
+
[
|
|
165
|
+
"1",
|
|
166
|
+
"2",
|
|
167
|
+
"3",
|
|
168
|
+
"4",
|
|
169
|
+
"5"
|
|
170
|
+
],
|
|
171
|
+
{
|
|
172
|
+
"Ref": "BootstrapVersion"
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"48.0.0"}
|