@pattform/api-kit 3.2.0 → 3.3.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/dist/AppComponent.d.ts
CHANGED
package/dist/AppComponent.js
CHANGED
|
@@ -151,11 +151,15 @@ class AppComponent extends pulumi.ComponentResource {
|
|
|
151
151
|
const cloudFlareProvider = new cloudflare.Provider(`pattform-app-cloudflare-${appName}-${env}`, {
|
|
152
152
|
apiToken: cloudFrontToken,
|
|
153
153
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
// A zone created in the same program (args.zoneId) can't be looked
|
|
155
|
+
// up by name yet, so its id is passed in instead.
|
|
156
|
+
const cloudflareZone = args.zoneId
|
|
157
|
+
? { id: pulumi.output(args.zoneId) }
|
|
158
|
+
: cloudflare.getZoneOutput({
|
|
159
|
+
name: args.domain
|
|
160
|
+
}, {
|
|
161
|
+
provider: cloudFlareProvider,
|
|
162
|
+
});
|
|
159
163
|
// ACM validates domain ownership with one deterministic CNAME per
|
|
160
164
|
// apex, shared across every cert for that domain. When another
|
|
161
165
|
// stack already manages the apex (e.g. the apex/www site while this
|
|
@@ -21,6 +21,10 @@ class ContainerComponent extends pulumi.ComponentResource {
|
|
|
21
21
|
const imageRefFromConfig = (_c = args.imageDigest) !== null && _c !== void 0 ? _c : componentConfig.get("imageRef");
|
|
22
22
|
// Create an Artifact Registry repository
|
|
23
23
|
this.repository = new gcp.artifactregistry.Repository("container-component-" + args.imageName + "-repo-" + args.environment, {
|
|
24
|
+
// Explicit (and on the Cloud Run service below): a capability's
|
|
25
|
+
// provider defaults to the platform project (pattform-management),
|
|
26
|
+
// not the client's.
|
|
27
|
+
project: gcpProject,
|
|
24
28
|
description: args.environment + " repository for " + args.imageName + " Docker images",
|
|
25
29
|
format: "DOCKER",
|
|
26
30
|
location: gcpRegion,
|
|
@@ -46,14 +50,17 @@ class ContainerComponent extends pulumi.ComponentResource {
|
|
|
46
50
|
});
|
|
47
51
|
// Form the repository URL
|
|
48
52
|
const repoUrl = pulumi.concat(gcpRegion, "-docker.pkg.dev/", gcpProject, "/", this.repository.repositoryId);
|
|
49
|
-
const imageRef =
|
|
50
|
-
? pulumi.
|
|
51
|
-
:
|
|
53
|
+
const imageRef = args.image
|
|
54
|
+
? pulumi.output(args.image)
|
|
55
|
+
: imageRefFromConfig
|
|
56
|
+
? pulumi.interpolate `${repoUrl}/${args.imageName}@${imageRefFromConfig}`
|
|
57
|
+
: pulumi.interpolate `${repoUrl}/${args.imageName}:latest`;
|
|
52
58
|
// Default Spring Boot probe paths (can be overridden via args)
|
|
53
59
|
const defaultReadinessPath = (_d = args.readinessPath) !== null && _d !== void 0 ? _d : "/actuator/health/readiness";
|
|
54
60
|
const defaultLivenessPath = (_e = args.livenessPath) !== null && _e !== void 0 ? _e : "/actuator/health/liveness";
|
|
55
61
|
// Create a Cloud Run service for the container image.
|
|
56
62
|
this.service = new gcp.cloudrunv2.Service("container-component-" + args.imageName + "-service-" + args.environment, {
|
|
63
|
+
project: gcpProject,
|
|
57
64
|
location: gcpRegion,
|
|
58
65
|
ingress: "INGRESS_TRAFFIC_ALL",
|
|
59
66
|
name: args.imageName + "-" + args.environment,
|