@microagi/alchemy-gcp 0.11.6 → 0.11.8
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/CHANGELOG.md +28 -0
- package/lib/ArtifactRegistry/Operations.d.ts +1 -1
- package/lib/ArtifactRegistry/Repository.d.ts +2 -2
- package/lib/ArtifactRegistry/Repository.d.ts.map +1 -1
- package/lib/ArtifactRegistry/Repository.js +5 -5
- package/lib/ArtifactRegistry/Repository.js.map +1 -1
- package/lib/ArtifactRegistry/RepositoryIamMember.d.ts +2 -1
- package/lib/ArtifactRegistry/RepositoryIamMember.d.ts.map +1 -1
- package/lib/ArtifactRegistry/RepositoryIamMember.js +1 -1
- package/lib/CloudResourceManager/Project.d.ts +2 -1
- package/lib/CloudResourceManager/Project.d.ts.map +1 -1
- package/lib/CloudResourceManager/Project.js +6 -6
- package/lib/CloudResourceManager/Project.js.map +1 -1
- package/lib/Compute/Address.d.ts +2 -1
- package/lib/Compute/Address.d.ts.map +1 -1
- package/lib/Compute/Address.js +4 -4
- package/lib/Compute/Address.js.map +1 -1
- package/lib/Compute/Firewall.d.ts +2 -1
- package/lib/Compute/Firewall.d.ts.map +1 -1
- package/lib/Compute/Firewall.js +1 -1
- package/lib/Compute/ForwardingRule.d.ts +2 -1
- package/lib/Compute/ForwardingRule.d.ts.map +1 -1
- package/lib/Compute/ForwardingRule.js +4 -4
- package/lib/Compute/ForwardingRule.js.map +1 -1
- package/lib/Compute/GlobalAddress.d.ts +2 -1
- package/lib/Compute/GlobalAddress.d.ts.map +1 -1
- package/lib/Compute/GlobalAddress.js +4 -4
- package/lib/Compute/GlobalAddress.js.map +1 -1
- package/lib/Compute/Network.d.ts +2 -1
- package/lib/Compute/Network.d.ts.map +1 -1
- package/lib/Compute/Network.js +1 -1
- package/lib/Compute/Operations.d.ts +1 -1
- package/lib/Compute/ProjectDefaultNetworkTier.d.ts +2 -1
- package/lib/Compute/ProjectDefaultNetworkTier.d.ts.map +1 -1
- package/lib/Compute/ProjectDefaultNetworkTier.js +1 -1
- package/lib/Compute/SharedVpcHost.d.ts +2 -1
- package/lib/Compute/SharedVpcHost.d.ts.map +1 -1
- package/lib/Compute/SharedVpcHost.js +1 -1
- package/lib/Compute/SharedVpcServiceProject.d.ts +2 -1
- package/lib/Compute/SharedVpcServiceProject.d.ts.map +1 -1
- package/lib/Compute/SharedVpcServiceProject.js +1 -1
- package/lib/Compute/Subnetwork.d.ts +2 -1
- package/lib/Compute/Subnetwork.d.ts.map +1 -1
- package/lib/Compute/Subnetwork.js +2 -2
- package/lib/Compute/Subnetwork.js.map +1 -1
- package/lib/Container/Cluster.d.ts +4 -2
- package/lib/Container/Cluster.d.ts.map +1 -1
- package/lib/Container/Cluster.js +28 -10
- package/lib/Container/Cluster.js.map +1 -1
- package/lib/Container/NodePool.d.ts +2 -2
- package/lib/Container/NodePool.d.ts.map +1 -1
- package/lib/Container/NodePool.js +22 -12
- package/lib/Container/NodePool.js.map +1 -1
- package/lib/Container/Operations.d.ts +1 -1
- package/lib/Iam/Operations.d.ts +42 -0
- package/lib/Iam/Operations.d.ts.map +1 -0
- package/lib/Iam/Operations.js +48 -0
- package/lib/Iam/Operations.js.map +1 -0
- package/lib/Iam/ServiceAccount.d.ts +2 -1
- package/lib/Iam/ServiceAccount.d.ts.map +1 -1
- package/lib/Iam/ServiceAccount.js +1 -1
- package/lib/Iam/ServiceAccountKey.d.ts +2 -1
- package/lib/Iam/ServiceAccountKey.d.ts.map +1 -1
- package/lib/Iam/ServiceAccountKey.js +1 -1
- package/lib/Iam/WorkloadIdentityPool.d.ts +101 -0
- package/lib/Iam/WorkloadIdentityPool.d.ts.map +1 -0
- package/lib/Iam/WorkloadIdentityPool.js +175 -0
- package/lib/Iam/WorkloadIdentityPool.js.map +1 -0
- package/lib/Iam/WorkloadIdentityPoolProvider.d.ts +125 -0
- package/lib/Iam/WorkloadIdentityPoolProvider.d.ts.map +1 -0
- package/lib/Iam/WorkloadIdentityPoolProvider.js +222 -0
- package/lib/Iam/WorkloadIdentityPoolProvider.js.map +1 -0
- package/lib/Iam/index.d.ts +4 -0
- package/lib/Iam/index.d.ts.map +1 -1
- package/lib/Iam/index.js +2 -0
- package/lib/Iam/index.js.map +1 -1
- package/lib/Kubernetes/Secret.d.ts.map +1 -1
- package/lib/Kubernetes/Secret.js.map +1 -1
- package/lib/ManagedLustre/Instance.d.ts +2 -1
- package/lib/ManagedLustre/Instance.d.ts.map +1 -1
- package/lib/ManagedLustre/Instance.js +6 -6
- package/lib/ManagedLustre/Instance.js.map +1 -1
- package/lib/Providers.d.ts.map +1 -1
- package/lib/Providers.js +5 -1
- package/lib/Providers.js.map +1 -1
- package/lib/Run/IamSync.d.ts +1 -1
- package/lib/Run/Job.d.ts +3 -3
- package/lib/Run/Job.d.ts.map +1 -1
- package/lib/Run/Job.js +5 -5
- package/lib/Run/Job.js.map +1 -1
- package/lib/Run/Operations.d.ts +1 -1
- package/lib/Run/Service.d.ts +2 -2
- package/lib/Run/Service.d.ts.map +1 -1
- package/lib/Run/Service.js +9 -7
- package/lib/Run/Service.js.map +1 -1
- package/lib/Run/index.d.ts +2 -2
- package/lib/ServiceNetworking/PsaConnection.d.ts +2 -1
- package/lib/ServiceNetworking/PsaConnection.d.ts.map +1 -1
- package/lib/ServiceNetworking/PsaConnection.js +1 -1
- package/lib/ServiceUsage/ApiEnable.d.ts +2 -1
- package/lib/ServiceUsage/ApiEnable.d.ts.map +1 -1
- package/lib/ServiceUsage/ApiEnable.js +1 -1
- package/lib/Sqladmin/Database.d.ts +2 -1
- package/lib/Sqladmin/Database.d.ts.map +1 -1
- package/lib/Sqladmin/Database.js +1 -1
- package/lib/Sqladmin/Instance.d.ts +2 -1
- package/lib/Sqladmin/Instance.d.ts.map +1 -1
- package/lib/Sqladmin/Instance.js +7 -7
- package/lib/Sqladmin/Instance.js.map +1 -1
- package/lib/Sqladmin/Operations.d.ts +1 -1
- package/lib/Sqladmin/User.d.ts +2 -1
- package/lib/Sqladmin/User.d.ts.map +1 -1
- package/lib/Sqladmin/User.js +1 -1
- package/lib/Storage/Bucket.d.ts +2 -2
- package/lib/Storage/Bucket.d.ts.map +1 -1
- package/lib/Storage/Bucket.js +1 -1
- package/lib/Storage/StorageBucketIamMember.d.ts +2 -1
- package/lib/Storage/StorageBucketIamMember.d.ts.map +1 -1
- package/lib/Storage/StorageBucketIamMember.js +1 -1
- package/lib/Tags.d.ts +3 -1
- package/lib/Tags.d.ts.map +1 -1
- package/lib/Tags.js +9 -1
- package/lib/Tags.js.map +1 -1
- package/package.json +9 -9
- package/src/ArtifactRegistry/Operations.ts +1 -1
- package/src/ArtifactRegistry/Repository.ts +5 -5
- package/src/ArtifactRegistry/RepositoryIamMember.ts +1 -1
- package/src/CloudResourceManager/Project.ts +6 -6
- package/src/Compute/Address.ts +4 -4
- package/src/Compute/Firewall.ts +1 -1
- package/src/Compute/ForwardingRule.ts +4 -4
- package/src/Compute/GlobalAddress.ts +4 -4
- package/src/Compute/Network.ts +1 -1
- package/src/Compute/Operations.ts +1 -1
- package/src/Compute/ProjectDefaultNetworkTier.ts +1 -1
- package/src/Compute/SharedVpcHost.ts +1 -1
- package/src/Compute/SharedVpcServiceProject.ts +1 -1
- package/src/Compute/Subnetwork.ts +2 -2
- package/src/Container/Cluster.ts +36 -11
- package/src/Container/NodePool.ts +30 -13
- package/src/Container/Operations.ts +1 -1
- package/src/Iam/Operations.ts +81 -0
- package/src/Iam/ServiceAccount.ts +1 -1
- package/src/Iam/ServiceAccountKey.ts +1 -1
- package/src/Iam/WorkloadIdentityPool.ts +309 -0
- package/src/Iam/WorkloadIdentityPoolProvider.ts +429 -0
- package/src/Iam/index.ts +10 -0
- package/src/Kubernetes/Secret.ts +4 -1
- package/src/ManagedLustre/Instance.ts +6 -6
- package/src/Providers.ts +12 -0
- package/src/Run/IamSync.ts +1 -1
- package/src/Run/Job.ts +6 -6
- package/src/Run/Operations.ts +1 -1
- package/src/Run/Service.ts +9 -7
- package/src/Run/index.ts +2 -2
- package/src/ServiceNetworking/PsaConnection.ts +1 -1
- package/src/ServiceUsage/ApiEnable.ts +1 -1
- package/src/Sqladmin/Database.ts +1 -1
- package/src/Sqladmin/Instance.ts +13 -7
- package/src/Sqladmin/Operations.ts +1 -1
- package/src/Sqladmin/User.ts +1 -1
- package/src/Storage/Bucket.ts +1 -1
- package/src/Storage/StorageBucketIamMember.ts +1 -1
- package/src/Tags.ts +16 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "@distilled.cloud/gcp";
|
|
2
|
-
import * as sn from "@distilled.cloud/gcp/
|
|
2
|
+
import * as sn from "@distilled.cloud/gcp/servicenetworking_v1";
|
|
3
3
|
import { Resource } from "alchemy";
|
|
4
4
|
import type { ScopedPlanStatusSession } from "alchemy/Cli/Cli";
|
|
5
5
|
import { deepEqual, isResolved } from "alchemy/Diff";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "@distilled.cloud/gcp";
|
|
2
|
-
import * as su from "@distilled.cloud/gcp/
|
|
2
|
+
import * as su from "@distilled.cloud/gcp/serviceusage_v1";
|
|
3
3
|
import { Resource } from "alchemy";
|
|
4
4
|
import type { ScopedPlanStatusSession } from "alchemy/Cli/Cli";
|
|
5
5
|
import { isResolved } from "alchemy/Diff";
|
package/src/Sqladmin/Database.ts
CHANGED
package/src/Sqladmin/Instance.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as sql from "@distilled.cloud/gcp/
|
|
1
|
+
import * as sql from "@distilled.cloud/gcp/sqladmin_v1";
|
|
2
2
|
import { Resource } from "alchemy";
|
|
3
3
|
import { Unowned } from "alchemy/AdoptPolicy";
|
|
4
4
|
import type { ScopedPlanStatusSession } from "alchemy/Cli/Cli";
|
|
@@ -11,7 +11,7 @@ import * as Effect from "effect/Effect";
|
|
|
11
11
|
import * as Redacted from "effect/Redacted";
|
|
12
12
|
import * as Schedule from "effect/Schedule";
|
|
13
13
|
import type * as GCP from "../Providers.ts";
|
|
14
|
-
import { gcpInternalLabels, hasAlchemyLabels } from "../Tags.ts";
|
|
14
|
+
import { gcpInternalLabels, hasAlchemyLabels, normalizeStringMap } from "../Tags.ts";
|
|
15
15
|
import { makeAwaitOperation } from "./Operations.ts";
|
|
16
16
|
import type {
|
|
17
17
|
PostgresVersion,
|
|
@@ -289,7 +289,7 @@ const toAttributes = (
|
|
|
289
289
|
}
|
|
290
290
|
: undefined,
|
|
291
291
|
settingsVersion: i.settings?.settingsVersion,
|
|
292
|
-
labels:
|
|
292
|
+
labels: normalizeStringMap(i.settings?.userLabels) ?? {},
|
|
293
293
|
};
|
|
294
294
|
};
|
|
295
295
|
|
|
@@ -341,7 +341,7 @@ const toSettingsBody = (
|
|
|
341
341
|
}
|
|
342
342
|
: {}),
|
|
343
343
|
...(s.backupConfiguration ? { backupConfiguration: s.backupConfiguration } : {}),
|
|
344
|
-
...(s.databaseFlags ? { databaseFlags: s.databaseFlags } : {}),
|
|
344
|
+
...(s.databaseFlags ? { databaseFlags: [...s.databaseFlags] } : {}),
|
|
345
345
|
...(s.deletionProtectionEnabled !== undefined
|
|
346
346
|
? { deletionProtectionEnabled: s.deletionProtectionEnabled }
|
|
347
347
|
: {}),
|
|
@@ -454,7 +454,7 @@ export const SqlInstanceProvider = () =>
|
|
|
454
454
|
);
|
|
455
455
|
|
|
456
456
|
const labelDiff = diffTags(
|
|
457
|
-
|
|
457
|
+
normalizeStringMap(obsSettings.userLabels) ?? {},
|
|
458
458
|
args.desiredLabels,
|
|
459
459
|
);
|
|
460
460
|
if (labelDiff.removed.length > 0 || labelDiff.upsert.length > 0) {
|
|
@@ -631,7 +631,10 @@ export const SqlInstanceProvider = () =>
|
|
|
631
631
|
);
|
|
632
632
|
for (const candidate of page?.items ?? []) {
|
|
633
633
|
if (
|
|
634
|
-
yield* hasAlchemyLabels(
|
|
634
|
+
yield* hasAlchemyLabels(
|
|
635
|
+
id,
|
|
636
|
+
normalizeStringMap(candidate.settings?.userLabels),
|
|
637
|
+
)
|
|
635
638
|
) {
|
|
636
639
|
observed = candidate;
|
|
637
640
|
break;
|
|
@@ -644,7 +647,10 @@ export const SqlInstanceProvider = () =>
|
|
|
644
647
|
region,
|
|
645
648
|
name: observed.name,
|
|
646
649
|
});
|
|
647
|
-
return (yield* hasAlchemyLabels(
|
|
650
|
+
return (yield* hasAlchemyLabels(
|
|
651
|
+
id,
|
|
652
|
+
normalizeStringMap(observed.settings?.userLabels),
|
|
653
|
+
))
|
|
648
654
|
? attrs
|
|
649
655
|
: Unowned(attrs);
|
|
650
656
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "@distilled.cloud/gcp";
|
|
2
|
-
import * as sql from "@distilled.cloud/gcp/
|
|
2
|
+
import * as sql from "@distilled.cloud/gcp/sqladmin_v1";
|
|
3
3
|
import type { ScopedPlanStatusSession } from "alchemy/Cli/Cli";
|
|
4
4
|
import * as Duration from "effect/Duration";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
package/src/Sqladmin/User.ts
CHANGED
package/src/Storage/Bucket.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "@distilled.cloud/gcp";
|
|
2
|
-
import * as storage from "@distilled.cloud/gcp/
|
|
2
|
+
import * as storage from "@distilled.cloud/gcp/storage_v1";
|
|
3
3
|
import { Resource } from "alchemy";
|
|
4
4
|
import { Unowned } from "alchemy/AdoptPolicy";
|
|
5
5
|
import { isResolved } from "alchemy/Diff";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigError } from "@distilled.cloud/gcp";
|
|
2
|
-
import * as storage from "@distilled.cloud/gcp/
|
|
2
|
+
import * as storage from "@distilled.cloud/gcp/storage_v1";
|
|
3
3
|
import { Resource } from "alchemy";
|
|
4
4
|
import { isResolved } from "alchemy/Diff";
|
|
5
5
|
import * as Provider from "alchemy/Provider";
|
package/src/Tags.ts
CHANGED
|
@@ -28,6 +28,18 @@ const sanitizeLabelValue = (raw: string): string => {
|
|
|
28
28
|
return replaced.slice(0, 63);
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
/** Normalize an SDK string map by omitting absent values at the boundary. */
|
|
32
|
+
export const normalizeStringMap = (
|
|
33
|
+
value: Record<string, string | undefined> | undefined,
|
|
34
|
+
): Record<string, string> | undefined =>
|
|
35
|
+
value === undefined
|
|
36
|
+
? undefined
|
|
37
|
+
: Object.fromEntries(
|
|
38
|
+
Object.entries(value).filter(
|
|
39
|
+
(entry): entry is [string, string] => entry[1] !== undefined,
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
|
|
31
43
|
/**
|
|
32
44
|
* Compute the alchemy-internal label set for a Resource. Merge the
|
|
33
45
|
* result with user-provided labels (user wins on key collision is
|
|
@@ -50,7 +62,10 @@ export const gcpInternalLabels = Effect.fnUntraced(function* (id: string) {
|
|
|
50
62
|
*/
|
|
51
63
|
export const hasAlchemyLabels = Effect.fnUntraced(function* (
|
|
52
64
|
id: string,
|
|
53
|
-
|
|
65
|
+
// Distilled's generated Kubernetes/GCP map types have index signatures that
|
|
66
|
+
// include `undefined` (`{ [k: string]: string | undefined }`), so accept the
|
|
67
|
+
// wider shape — the equality checks below are unaffected.
|
|
68
|
+
labels: Record<string, string | undefined> | undefined,
|
|
54
69
|
) {
|
|
55
70
|
if (!labels) return false;
|
|
56
71
|
const expected = yield* gcpInternalLabels(id);
|