@kirschbaum-development/sst-laravel 0.2.16 → 0.3.0
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/laravel-sst.ts +32 -0
- package/package.json +1 -1
package/laravel-sst.ts
CHANGED
|
@@ -55,6 +55,36 @@ export interface LaravelServiceArgs {
|
|
|
55
55
|
health?: ServiceArgs['health'];
|
|
56
56
|
executionRole?: ServiceArgs['executionRole'];
|
|
57
57
|
permissions?: ServiceArgs['permissions'];
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Transform the underlying ECS Service resources. Useful for hardening the
|
|
61
|
+
* ALB (e.g. restricting the load-balancer security group to a fixed set of
|
|
62
|
+
* upstream CIDRs) or adjusting other inner resources.
|
|
63
|
+
*
|
|
64
|
+
* `image` and `taskDefinition` are managed internally and cannot be
|
|
65
|
+
* overridden here — they carry the env-file dependency wiring and the
|
|
66
|
+
* `initProcessEnabled: false` setting required by this package.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```js
|
|
70
|
+
* web: {
|
|
71
|
+
* transform: {
|
|
72
|
+
* loadBalancerSecurityGroup: (sgArgs) => {
|
|
73
|
+
* sgArgs.ingress = [{
|
|
74
|
+
* protocol: "tcp",
|
|
75
|
+
* fromPort: 443,
|
|
76
|
+
* toPort: 443,
|
|
77
|
+
* cidrBlocks: ["173.245.48.0/20", "103.21.244.0/22"],
|
|
78
|
+
* }];
|
|
79
|
+
* },
|
|
80
|
+
* },
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
transform?: Omit<
|
|
85
|
+
NonNullable<ServiceArgs['transform']>,
|
|
86
|
+
'image' | 'taskDefinition'
|
|
87
|
+
>;
|
|
58
88
|
}
|
|
59
89
|
|
|
60
90
|
export interface LaravelWebArgs extends LaravelServiceArgs {
|
|
@@ -353,6 +383,7 @@ export class LaravelService extends Component {
|
|
|
353
383
|
},
|
|
354
384
|
|
|
355
385
|
transform: {
|
|
386
|
+
...(args.web?.transform ?? {}),
|
|
356
387
|
image: addEnvironmentFileImageDependency,
|
|
357
388
|
taskDefinition: (args) => {
|
|
358
389
|
args.containerDefinitions = (
|
|
@@ -467,6 +498,7 @@ export class LaravelService extends Component {
|
|
|
467
498
|
},
|
|
468
499
|
|
|
469
500
|
transform: {
|
|
501
|
+
...(workerConfig.transform ?? {}),
|
|
470
502
|
image: addEnvironmentFileImageDependency,
|
|
471
503
|
taskDefinition: (args) => {
|
|
472
504
|
args.containerDefinitions = (
|
package/package.json
CHANGED