@studion/infra-code-blocks 2.0.0-alpha.4 → 2.0.0-alpha.5
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/dist/components/acm-certificate/index.js +6 -1
- package/dist/components/cloudfront/index.d.ts.map +1 -1
- package/dist/components/cloudfront/index.js +93 -46
- package/dist/components/cloudfront/lb-cache-strategy.js +9 -1
- package/dist/components/cloudfront/s3-cache-strategy.js +12 -4
- package/dist/components/database/builder.js +34 -7
- package/dist/components/database/database-replica.js +27 -3
- package/dist/components/database/ec2-ssm-connect.d.ts +2 -1
- package/dist/components/database/ec2-ssm-connect.d.ts.map +1 -1
- package/dist/components/database/ec2-ssm-connect.js +33 -16
- package/dist/components/database/index.js +55 -7
- package/dist/components/ecs-service/index.js +70 -28
- package/dist/components/grafana/dashboards/panels.js +23 -17
- package/dist/components/grafana/dashboards/web-server-slo.js +4 -1
- package/dist/components/password/index.js +7 -1
- package/dist/components/prometheus/queries.test.js +10 -19
- package/dist/components/redis/elasticache-redis.js +6 -1
- package/dist/components/redis/upstash-redis.js +8 -2
- package/dist/components/static-site/index.js +7 -1
- package/dist/components/static-site/s3-assets.js +4 -1
- package/dist/components/vpc/index.js +2 -1
- package/dist/components/web-server/builder.js +32 -6
- package/dist/components/web-server/index.js +46 -14
- package/dist/components/web-server/load-balancer.js +13 -3
- package/dist/otel/builder.js +4 -1
- package/dist/otel/config.js +11 -14
- package/dist/otel/index.js +7 -3
- package/package.json +34 -47
package/dist/otel/config.js
CHANGED
|
@@ -3,15 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OtelCollectorConfigBuilder = void 0;
|
|
4
4
|
const otlp_receiver_1 = require("./otlp-receiver");
|
|
5
5
|
class OtelCollectorConfigBuilder {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
}
|
|
6
|
+
_receivers = {};
|
|
7
|
+
_processors = {};
|
|
8
|
+
_exporters = {};
|
|
9
|
+
_extensions = {};
|
|
10
|
+
_service = {
|
|
11
|
+
pipelines: {},
|
|
12
|
+
};
|
|
15
13
|
withOTLPReceiver(protocols = ['http']) {
|
|
16
14
|
if (!protocols.length) {
|
|
17
15
|
throw new Error('At least one OTLP receiver protocol should be provided');
|
|
@@ -21,7 +19,7 @@ class OtelCollectorConfigBuilder {
|
|
|
21
19
|
if (!protocolConfig) {
|
|
22
20
|
throw new Error(`OTLP receiver protocol ${current} is not supported`);
|
|
23
21
|
}
|
|
24
|
-
return
|
|
22
|
+
return { ...all, [current]: protocolConfig };
|
|
25
23
|
}, {});
|
|
26
24
|
this._receivers.otlp = { protocols: protocolsConfig };
|
|
27
25
|
return this;
|
|
@@ -159,18 +157,17 @@ class OtelCollectorConfigBuilder {
|
|
|
159
157
|
}
|
|
160
158
|
}
|
|
161
159
|
validatePipelineComponents(pipelineType) {
|
|
162
|
-
|
|
163
|
-
(_a = this._service.pipelines[pipelineType]) === null || _a === void 0 ? void 0 : _a.receivers.forEach(receiver => {
|
|
160
|
+
this._service.pipelines[pipelineType]?.receivers.forEach(receiver => {
|
|
164
161
|
if (!this._receivers[receiver]) {
|
|
165
162
|
throw new Error(`Receiver '${receiver}' is used in ${pipelineType} pipeline but not defined`);
|
|
166
163
|
}
|
|
167
164
|
});
|
|
168
|
-
|
|
165
|
+
this._service.pipelines[pipelineType]?.processors.forEach(processor => {
|
|
169
166
|
if (!this._processors[processor]) {
|
|
170
167
|
throw new Error(`Processor '${processor}' is used in ${pipelineType} pipeline but not defined`);
|
|
171
168
|
}
|
|
172
169
|
});
|
|
173
|
-
|
|
170
|
+
this._service.pipelines[pipelineType]?.exporters.forEach(exporter => {
|
|
174
171
|
if (!this._exporters[exporter]) {
|
|
175
172
|
throw new Error(`Exporter '${exporter}' is used in ${pipelineType} pipeline but not defined`);
|
|
176
173
|
}
|
package/dist/otel/index.js
CHANGED
|
@@ -4,6 +4,11 @@ exports.OtelCollector = void 0;
|
|
|
4
4
|
const pulumi = require("@pulumi/pulumi");
|
|
5
5
|
const yaml = require("yaml");
|
|
6
6
|
class OtelCollector {
|
|
7
|
+
config;
|
|
8
|
+
configVolume;
|
|
9
|
+
container;
|
|
10
|
+
configContainer;
|
|
11
|
+
taskRoleInlinePolicies;
|
|
7
12
|
constructor(serviceName, env, config, opts = {}) {
|
|
8
13
|
const containerName = opts.containerName || pulumi.interpolate `${serviceName}-otel-collector`;
|
|
9
14
|
const configVolumeName = opts.configVolumeName || 'otel-collector-config-volume';
|
|
@@ -45,9 +50,8 @@ class OtelCollector {
|
|
|
45
50
|
];
|
|
46
51
|
}
|
|
47
52
|
getCollectorPortMappings(config) {
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const hasOTLPHttpReceiver = !!((_b = config.receivers.otlp) === null || _b === void 0 ? void 0 : _b.protocols.http);
|
|
53
|
+
const hasOTLPGRpcReceiver = !!config.receivers.otlp?.protocols.grpc;
|
|
54
|
+
const hasOTLPHttpReceiver = !!config.receivers.otlp?.protocols.http;
|
|
51
55
|
const protocol = 'tcp';
|
|
52
56
|
return [
|
|
53
57
|
...(hasOTLPGRpcReceiver
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studion/infra-code-blocks",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"description": "Studion common infra components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"infrastructure",
|
|
@@ -35,63 +35,50 @@
|
|
|
35
35
|
},
|
|
36
36
|
"prettier": "@studion/prettier-config",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@pulumi/aws": "^7.
|
|
39
|
-
"@pulumi/aws-native": "^1.
|
|
40
|
-
"@pulumi/awsx": "^3.1
|
|
41
|
-
"@pulumi/pulumi": "^3.
|
|
42
|
-
"@pulumi/random": "^4.
|
|
43
|
-
"@pulumiverse/grafana": "^
|
|
38
|
+
"@pulumi/aws": "^7.21.0",
|
|
39
|
+
"@pulumi/aws-native": "^1.56.0",
|
|
40
|
+
"@pulumi/awsx": "^3.2.1",
|
|
41
|
+
"@pulumi/pulumi": "^3.225.0",
|
|
42
|
+
"@pulumi/random": "^4.19.1",
|
|
43
|
+
"@pulumiverse/grafana": "^2.21.0",
|
|
44
44
|
"@upstash/pulumi": "^0.5.0",
|
|
45
|
-
"yaml": "^2.
|
|
45
|
+
"yaml": "^2.8.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@aws-sdk/client-acm": "^3.
|
|
49
|
-
"@aws-sdk/client-application-auto-scaling": "^3.
|
|
50
|
-
"@aws-sdk/client-cloudfront": "^3.
|
|
51
|
-
"@aws-sdk/client-cloudwatch-logs": "^3.
|
|
52
|
-
"@aws-sdk/client-ec2": "^3.
|
|
53
|
-
"@aws-sdk/client-ecs": "^3.
|
|
54
|
-
"@aws-sdk/client-efs": "^3.
|
|
55
|
-
"@aws-sdk/client-elastic-load-balancing-v2": "^3.
|
|
56
|
-
"@aws-sdk/client-elasticache": "^3.
|
|
57
|
-
"@aws-sdk/client-iam": "^3.
|
|
58
|
-
"@aws-sdk/client-kms": "^3.
|
|
59
|
-
"@aws-sdk/client-rds": "^3.
|
|
60
|
-
"@aws-sdk/client-route-53": "^3.
|
|
61
|
-
"@aws-sdk/client-s3": "^3.
|
|
62
|
-
"@aws-sdk/client-secrets-manager": "^3.
|
|
63
|
-
"@aws-sdk/client-servicediscovery": "^3.
|
|
64
|
-
"@aws-sdk/client-ssm": "^3.
|
|
65
|
-
"@aws-sdk/client-xray": "^3.
|
|
48
|
+
"@aws-sdk/client-acm": "^3.1002.0",
|
|
49
|
+
"@aws-sdk/client-application-auto-scaling": "^3.1002.0",
|
|
50
|
+
"@aws-sdk/client-cloudfront": "^3.1002.0",
|
|
51
|
+
"@aws-sdk/client-cloudwatch-logs": "^3.1002.0",
|
|
52
|
+
"@aws-sdk/client-ec2": "^3.1002.0",
|
|
53
|
+
"@aws-sdk/client-ecs": "^3.1002.0",
|
|
54
|
+
"@aws-sdk/client-efs": "^3.1002.0",
|
|
55
|
+
"@aws-sdk/client-elastic-load-balancing-v2": "^3.1002.0",
|
|
56
|
+
"@aws-sdk/client-elasticache": "^3.1002.0",
|
|
57
|
+
"@aws-sdk/client-iam": "^3.1002.0",
|
|
58
|
+
"@aws-sdk/client-kms": "^3.1002.0",
|
|
59
|
+
"@aws-sdk/client-rds": "^3.1002.0",
|
|
60
|
+
"@aws-sdk/client-route-53": "^3.1002.0",
|
|
61
|
+
"@aws-sdk/client-s3": "^3.1002.0",
|
|
62
|
+
"@aws-sdk/client-secrets-manager": "^3.1002.0",
|
|
63
|
+
"@aws-sdk/client-servicediscovery": "^3.1002.0",
|
|
64
|
+
"@aws-sdk/client-ssm": "^3.1002.0",
|
|
65
|
+
"@aws-sdk/client-xray": "^3.1002.0",
|
|
66
66
|
"@studion/prettier-config": "^0.1.0",
|
|
67
|
-
"@types/node": "^
|
|
68
|
-
"exponential-backoff": "^3.1.
|
|
67
|
+
"@types/node": "^25",
|
|
68
|
+
"exponential-backoff": "^3.1.3",
|
|
69
69
|
"http-status": "^2.1.0",
|
|
70
70
|
"husky": "^9.1.7",
|
|
71
|
-
"ioredis": "^5.
|
|
72
|
-
"lint-staged": "^16.
|
|
71
|
+
"ioredis": "^5.10.0",
|
|
72
|
+
"lint-staged": "^16.3.2",
|
|
73
73
|
"mime": "^4.1.0",
|
|
74
74
|
"nanospinner": "^1.2.2",
|
|
75
75
|
"pathe": "^2.0.3",
|
|
76
|
-
"prettier": "^3.
|
|
76
|
+
"prettier": "^3.8.1",
|
|
77
77
|
"release-it": "^19.2.4",
|
|
78
|
-
"tstyche": "^
|
|
78
|
+
"tstyche": "^6.2.0",
|
|
79
79
|
"tsx": "^4.21.0",
|
|
80
|
-
"typescript": "^5.
|
|
81
|
-
"undici": "^
|
|
82
|
-
},
|
|
83
|
-
"overrides": {
|
|
84
|
-
"@pulumi/pulumi": {
|
|
85
|
-
"glob": "10.5.0",
|
|
86
|
-
"minimatch": "10.2.4",
|
|
87
|
-
"tar": "7.5.9"
|
|
88
|
-
},
|
|
89
|
-
"@aws-sdk/core": {
|
|
90
|
-
"fast-xml-parser": "5.3.6"
|
|
91
|
-
},
|
|
92
|
-
"get-uri": {
|
|
93
|
-
"basic-ftp": "5.2.0"
|
|
94
|
-
}
|
|
80
|
+
"typescript": "^5.9.3",
|
|
81
|
+
"undici": "^7.22.0"
|
|
95
82
|
},
|
|
96
83
|
"publishConfig": {
|
|
97
84
|
"access": "public"
|