@pulumi/rancher2 10.4.0-alpha.1766557538 → 11.0.0-alpha.1766596160

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.
Files changed (44) hide show
  1. package/README.md +2 -2
  2. package/authConfigGenericOidc.d.ts +313 -0
  3. package/authConfigGenericOidc.js +134 -0
  4. package/authConfigGenericOidc.js.map +1 -0
  5. package/authConfigGithubapp.d.ts +133 -0
  6. package/authConfigGithubapp.js +89 -0
  7. package/authConfigGithubapp.js.map +1 -0
  8. package/cluster.d.ts +36 -340
  9. package/cluster.js +36 -340
  10. package/cluster.js.map +1 -1
  11. package/clusterProxyConfigV2.d.ts +96 -0
  12. package/clusterProxyConfigV2.js +61 -0
  13. package/clusterProxyConfigV2.js.map +1 -0
  14. package/clusterSync.d.ts +4 -4
  15. package/clusterSync.js +4 -4
  16. package/getClusterProxyConfigV2.d.ts +14 -0
  17. package/getClusterProxyConfigV2.js +18 -0
  18. package/getClusterProxyConfigV2.js.map +1 -0
  19. package/index.d.ts +12 -18
  20. package/index.js +20 -26
  21. package/index.js.map +1 -1
  22. package/nodePool.d.ts +4 -4
  23. package/nodePool.js +4 -4
  24. package/package.json +2 -2
  25. package/types/input.d.ts +762 -2581
  26. package/types/output.d.ts +2358 -5036
  27. package/clusterTemplate.d.ts +0 -215
  28. package/clusterTemplate.js +0 -146
  29. package/clusterTemplate.js.map +0 -1
  30. package/etcdBackup.d.ts +0 -186
  31. package/etcdBackup.js +0 -106
  32. package/etcdBackup.js.map +0 -1
  33. package/getClusterTemplate.d.ts +0 -115
  34. package/getClusterTemplate.js +0 -60
  35. package/getClusterTemplate.js.map +0 -1
  36. package/getEtcdBackup.d.ts +0 -99
  37. package/getEtcdBackup.js +0 -54
  38. package/getEtcdBackup.js.map +0 -1
  39. package/getNodeTemplate.d.ts +0 -134
  40. package/getNodeTemplate.js +0 -52
  41. package/getNodeTemplate.js.map +0 -1
  42. package/nodeTemplate.d.ts +0 -562
  43. package/nodeTemplate.js +0 -261
  44. package/nodeTemplate.js.map +0 -1
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.AuthConfigGithubapp = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ class AuthConfigGithubapp extends pulumi.CustomResource {
9
+ /**
10
+ * Get an existing AuthConfigGithubapp resource's state with the given name, ID, and optional extra
11
+ * properties used to qualify the lookup.
12
+ *
13
+ * @param name The _unique_ name of the resulting resource.
14
+ * @param id The _unique_ provider ID of the resource to lookup.
15
+ * @param state Any extra arguments used during the lookup.
16
+ * @param opts Optional settings to control the behavior of the CustomResource.
17
+ */
18
+ static get(name, id, state, opts) {
19
+ return new AuthConfigGithubapp(name, state, { ...opts, id: id });
20
+ }
21
+ /**
22
+ * Returns true if the given object is an instance of AuthConfigGithubapp. This is designed to work even
23
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
24
+ */
25
+ static isInstance(obj) {
26
+ if (obj === undefined || obj === null) {
27
+ return false;
28
+ }
29
+ return obj['__pulumiType'] === AuthConfigGithubapp.__pulumiType;
30
+ }
31
+ constructor(name, argsOrState, opts) {
32
+ let resourceInputs = {};
33
+ opts = opts || {};
34
+ if (opts.id) {
35
+ const state = argsOrState;
36
+ resourceInputs["accessMode"] = state?.accessMode;
37
+ resourceInputs["allowedPrincipalIds"] = state?.allowedPrincipalIds;
38
+ resourceInputs["annotations"] = state?.annotations;
39
+ resourceInputs["appId"] = state?.appId;
40
+ resourceInputs["clientId"] = state?.clientId;
41
+ resourceInputs["clientSecret"] = state?.clientSecret;
42
+ resourceInputs["enabled"] = state?.enabled;
43
+ resourceInputs["hostname"] = state?.hostname;
44
+ resourceInputs["installationId"] = state?.installationId;
45
+ resourceInputs["labels"] = state?.labels;
46
+ resourceInputs["name"] = state?.name;
47
+ resourceInputs["privateKey"] = state?.privateKey;
48
+ resourceInputs["tls"] = state?.tls;
49
+ resourceInputs["type"] = state?.type;
50
+ }
51
+ else {
52
+ const args = argsOrState;
53
+ if (args?.appId === undefined && !opts.urn) {
54
+ throw new Error("Missing required property 'appId'");
55
+ }
56
+ if (args?.clientId === undefined && !opts.urn) {
57
+ throw new Error("Missing required property 'clientId'");
58
+ }
59
+ if (args?.clientSecret === undefined && !opts.urn) {
60
+ throw new Error("Missing required property 'clientSecret'");
61
+ }
62
+ if (args?.privateKey === undefined && !opts.urn) {
63
+ throw new Error("Missing required property 'privateKey'");
64
+ }
65
+ resourceInputs["accessMode"] = args?.accessMode;
66
+ resourceInputs["allowedPrincipalIds"] = args?.allowedPrincipalIds;
67
+ resourceInputs["annotations"] = args?.annotations;
68
+ resourceInputs["appId"] = args?.appId;
69
+ resourceInputs["clientId"] = args?.clientId ? pulumi.secret(args.clientId) : undefined;
70
+ resourceInputs["clientSecret"] = args?.clientSecret ? pulumi.secret(args.clientSecret) : undefined;
71
+ resourceInputs["enabled"] = args?.enabled;
72
+ resourceInputs["hostname"] = args?.hostname;
73
+ resourceInputs["installationId"] = args?.installationId;
74
+ resourceInputs["labels"] = args?.labels;
75
+ resourceInputs["privateKey"] = args?.privateKey;
76
+ resourceInputs["tls"] = args?.tls;
77
+ resourceInputs["name"] = undefined /*out*/;
78
+ resourceInputs["type"] = undefined /*out*/;
79
+ }
80
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
81
+ const secretOpts = { additionalSecretOutputs: ["clientId", "clientSecret"] };
82
+ opts = pulumi.mergeOptions(opts, secretOpts);
83
+ super(AuthConfigGithubapp.__pulumiType, name, resourceInputs, opts);
84
+ }
85
+ }
86
+ exports.AuthConfigGithubapp = AuthConfigGithubapp;
87
+ /** @internal */
88
+ AuthConfigGithubapp.__pulumiType = 'rancher2:index/authConfigGithubapp:AuthConfigGithubapp';
89
+ //# sourceMappingURL=authConfigGithubapp.js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,CAAC;;AAtHL,kDAuHC;AAzGG,gBAAgB;AACO,gCAAY,GAAG,wDAAwD,CAAC"}
package/cluster.d.ts CHANGED
@@ -2,376 +2,72 @@ import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "./types/input";
3
3
  import * as outputs from "./types/output";
4
4
  /**
5
- * Provides a Rancher v2 Cluster resource. This can be used to create Clusters for Rancher v2 environments and retrieve their information.
5
+ * Provides a Rancher v2 Cluster resource. This can be used to create imported Clusters for Rancher v2 environments and retrieve their information.
6
6
  *
7
- * ## Example Usage
8
- *
9
- * **Note optional/computed arguments** If any `optional/computed` argument of this resource is defined by the user, removing it from tf file will NOT reset its value. To reset it, let its definition at tf file as empty/false object. Ex: `cloudProvider {}`, `name = ""`
10
- *
11
- * ### Creating Rancher v2 imported cluster
12
- *
13
- * ```typescript
14
- * import * as pulumi from "@pulumi/pulumi";
15
- * import * as rancher2 from "@pulumi/rancher2";
16
- *
17
- * // Create a new rancher2 imported Cluster
18
- * const foo_imported = new rancher2.Cluster("foo-imported", {
19
- * name: "foo-imported",
20
- * description: "Foo rancher2 imported cluster",
21
- * });
22
- * ```
23
- *
24
- * ### Creating Rancher v2 imported cluster with custom configuration. For Rancher v2.11.x and above.
25
- *
26
- * This configuration can be used to indicate that system images (such as the rancher-agent) should be pulled from an unauthenticated private registry. This can be used for all imported cluster types, including imported hosted clusters (AKS, EKS, GKE).
27
- *
28
- * ```typescript
29
- * import * as pulumi from "@pulumi/pulumi";
30
- * import * as rancher2 from "@pulumi/rancher2";
31
- *
32
- * // Create a new rancher2 imported Cluster with custom configuration
33
- * const foo_imported = new rancher2.Cluster("foo-imported", {
34
- * name: "foo-imported",
35
- * importedConfig: {
36
- * privateRegistryUrl: "test.io",
37
- * },
38
- * });
39
- * ```
40
- *
41
- * ### Creating Rancher v2 RKE cluster enabling
42
- *
43
- * ```typescript
44
- * import * as pulumi from "@pulumi/pulumi";
45
- * import * as rancher2 from "@pulumi/rancher2";
46
- *
47
- * // Create a new rancher2 RKE Cluster
48
- * const foo_custom = new rancher2.Cluster("foo-custom", {
49
- * name: "foo-custom",
50
- * description: "Foo rancher2 custom cluster",
51
- * rkeConfig: {
52
- * network: {
53
- * plugin: "canal",
54
- * },
55
- * },
56
- * });
57
- * ```
58
- *
59
- * ### Creating Rancher v2 RKE cluster enabling/customizing istio
60
- *
61
- * ```typescript
62
- * import * as pulumi from "@pulumi/pulumi";
63
- * import * as rancher2 from "@pulumi/rancher2";
7
+ * **Hint**: To create node-driver and custom RKE2 and K3s Clusters, use the Rancher v2 Cluster v2 resource instead.
64
8
  *
65
- * // Create a new rancher2 RKE Cluster
66
- * const foo_custom = new rancher2.Cluster("foo-custom", {
67
- * name: "foo-custom",
68
- * description: "Foo rancher2 custom cluster",
69
- * rkeConfig: {
70
- * network: {
71
- * plugin: "canal",
72
- * },
73
- * },
74
- * });
75
- * // Create a new rancher2 Cluster Sync for foo-custom cluster
76
- * const foo_customClusterSync = new rancher2.ClusterSync("foo-custom", {clusterId: foo_custom.id});
77
- * // Create a new rancher2 Namespace
78
- * const foo_istio = new rancher2.Namespace("foo-istio", {
79
- * name: "istio-system",
80
- * projectId: foo_customClusterSync.systemProjectId,
81
- * description: "istio namespace",
82
- * });
83
- * // Create a new rancher2 App deploying istio
84
- * const istio = new rancher2.index.App("istio", {
85
- * catalogName: "system-library",
86
- * name: "cluster-istio",
87
- * description: "Terraform app acceptance test",
88
- * projectId: foo_istio.projectId,
89
- * templateName: "rancher-istio",
90
- * templateVersion: "0.1.1",
91
- * targetNamespace: foo_istio.id,
92
- * answers: {
93
- * "certmanager.enabled": false,
94
- * enableCRDs: true,
95
- * "galley.enabled": true,
96
- * "gateways.enabled": false,
97
- * "gateways.istio-ingressgateway.resources.limits.cpu": "2000m",
98
- * "gateways.istio-ingressgateway.resources.limits.memory": "1024Mi",
99
- * "gateways.istio-ingressgateway.resources.requests.cpu": "100m",
100
- * "gateways.istio-ingressgateway.resources.requests.memory": "128Mi",
101
- * "gateways.istio-ingressgateway.type": "NodePort",
102
- * "global.rancher.clusterId": foo_customClusterSync.clusterId,
103
- * "istio_cni.enabled": "false",
104
- * "istiocoredns.enabled": "false",
105
- * "kiali.enabled": "true",
106
- * "mixer.enabled": "true",
107
- * "mixer.policy.enabled": "true",
108
- * "mixer.policy.resources.limits.cpu": "4800m",
109
- * "mixer.policy.resources.limits.memory": "4096Mi",
110
- * "mixer.policy.resources.requests.cpu": "1000m",
111
- * "mixer.policy.resources.requests.memory": "1024Mi",
112
- * "mixer.telemetry.resources.limits.cpu": "4800m",
113
- * "mixer.telemetry.resources.limits.memory": "4096Mi",
114
- * "mixer.telemetry.resources.requests.cpu": "1000m",
115
- * "mixer.telemetry.resources.requests.memory": "1024Mi",
116
- * "mtls.enabled": false,
117
- * "nodeagent.enabled": false,
118
- * "pilot.enabled": true,
119
- * "pilot.resources.limits.cpu": "1000m",
120
- * "pilot.resources.limits.memory": "4096Mi",
121
- * "pilot.resources.requests.cpu": "500m",
122
- * "pilot.resources.requests.memory": "2048Mi",
123
- * "pilot.traceSampling": "1",
124
- * "security.enabled": true,
125
- * "sidecarInjectorWebhook.enabled": true,
126
- * "tracing.enabled": true,
127
- * "tracing.jaeger.resources.limits.cpu": "500m",
128
- * "tracing.jaeger.resources.limits.memory": "1024Mi",
129
- * "tracing.jaeger.resources.requests.cpu": "100m",
130
- * "tracing.jaeger.resources.requests.memory": "100Mi",
131
- * },
132
- * });
133
- * ```
9
+ * **Important:**
134
10
  *
135
- * ### Creating Rancher v2 RKE cluster assigning a node pool (overlapped planes)
11
+ * Rancher Kubernetes Engine (RKE/RKE1) has reached end of life as of July 31, 2025.
12
+ * Rancher versions **2.12.0 and later** no longer support provisioning or managing downstream RKE1 clusters.
13
+ * We recommend replatforming RKE1 clusters to RKE2 to ensure continued support and security updates. Learn more about the transition [here](https://support.scc.suse.com/s/kb/RKE-to-RKE2-replatforming-instructions-and-FAQs).
136
14
  *
137
- * ```typescript
138
- * import * as pulumi from "@pulumi/pulumi";
139
- * import * as rancher2 from "@pulumi/rancher2";
15
+ * ## Example Usage
140
16
  *
141
- * // Create a new rancher2 RKE Cluster
142
- * const foo_custom = new rancher2.Cluster("foo-custom", {
143
- * name: "foo-custom",
144
- * description: "Foo rancher2 custom cluster",
145
- * rkeConfig: {
146
- * network: {
147
- * plugin: "canal",
148
- * },
149
- * },
150
- * });
151
- * // Create a new rancher2 Node Template
152
- * const foo = new rancher2.NodeTemplate("foo", {
153
- * name: "foo",
154
- * description: "foo test",
155
- * amazonec2Config: {
156
- * accessKey: "<AWS_ACCESS_KEY>",
157
- * secretKey: "<AWS_SECRET_KEY>",
158
- * ami: "<AMI_ID>",
159
- * region: "<REGION>",
160
- * securityGroups: ["<AWS_SECURITY_GROUP>"],
161
- * subnetId: "<SUBNET_ID>",
162
- * vpcId: "<VPC_ID>",
163
- * zone: "<ZONE>",
164
- * },
165
- * });
166
- * // Create a new rancher2 Node Pool
167
- * const fooNodePool = new rancher2.NodePool("foo", {
168
- * clusterId: foo_custom.id,
169
- * name: "foo",
170
- * hostnamePrefix: "foo-cluster-0",
171
- * nodeTemplateId: foo.id,
172
- * quantity: 3,
173
- * controlPlane: true,
174
- * etcd: true,
175
- * worker: true,
176
- * });
177
- * ```
17
+ * **Note optional/computed arguments** If any `optional/computed` argument of this resource is defined by the user, removing it from tf file will NOT reset its value. To reset it, let its definition at tf file as empty/false object. Ex: `cloudProvider {}`, `name = ""`
178
18
  *
179
- * ### Creating Rancher v2 RKE cluster from template. For Rancher v2.3.x and above.
19
+ * ### Creating a Rancher v2 imported cluster and retrieving the registration commands
180
20
  *
181
21
  * ```typescript
182
22
  * import * as pulumi from "@pulumi/pulumi";
183
23
  * import * as rancher2 from "@pulumi/rancher2";
184
24
  *
185
- * // Create a new rancher2 cluster template
186
- * const foo = new rancher2.ClusterTemplate("foo", {
187
- * name: "foo",
188
- * members: [{
189
- * accessType: "owner",
190
- * userPrincipalId: "local://user-XXXXX",
191
- * }],
192
- * templateRevisions: [{
193
- * name: "V1",
194
- * clusterConfig: {
195
- * rkeConfig: {
196
- * network: {
197
- * plugin: "canal",
198
- * },
199
- * services: {
200
- * etcd: {
201
- * creation: "6h",
202
- * retention: "24h",
203
- * },
204
- * },
205
- * },
206
- * },
207
- * "default": true,
208
- * }],
209
- * description: "Test cluster template v2",
210
- * });
211
- * // Create a new rancher2 RKE Cluster from template
212
- * const fooCluster = new rancher2.Cluster("foo", {
213
- * name: "foo",
214
- * clusterTemplateId: foo.id,
215
- * clusterTemplateRevisionId: foo.templateRevisions.apply(templateRevisions => templateRevisions[0].id),
216
- * });
25
+ * export = async () => {
26
+ * // Create a new rancher2 imported Cluster
27
+ * const foo_imported = new rancher2.Cluster("foo-imported", {
28
+ * name: "foo-imported",
29
+ * description: "Foo rancher2 imported cluster",
30
+ * });
31
+ * return {
32
+ * "kubectl-command": [foo_imported.clusterRegistrationToken.apply(clusterRegistrationToken => clusterRegistrationToken.command)],
33
+ * "insecure-kubectl-command": [foo_imported.clusterRegistrationToken.apply(clusterRegistrationToken => clusterRegistrationToken.insecureCommand)],
34
+ * };
35
+ * }
217
36
  * ```
218
37
  *
219
- * ### Creating Rancher v2 RKE cluster with upgrade strategy. For Rancher v2.4.x and above.
220
- *
221
- * ```typescript
222
- * import * as pulumi from "@pulumi/pulumi";
223
- * import * as rancher2 from "@pulumi/rancher2";
38
+ * ### Creating an imported cluster and configuring the version-management feature. For Rancher v2.11.0 and above.
224
39
  *
225
- * const foo = new rancher2.Cluster("foo", {
226
- * name: "foo",
227
- * description: "Terraform custom cluster",
228
- * rkeConfig: {
229
- * network: {
230
- * plugin: "canal",
231
- * },
232
- * services: {
233
- * etcd: {
234
- * creation: "6h",
235
- * retention: "24h",
236
- * },
237
- * kubeApi: {
238
- * auditLog: {
239
- * enabled: true,
240
- * configuration: {
241
- * maxAge: 5,
242
- * maxBackup: 5,
243
- * maxSize: 100,
244
- * path: "-",
245
- * format: "json",
246
- * policy: `apiVersion: audit.k8s.io/v1
247
- * kind: Policy
248
- * metadata:
249
- * creationTimestamp: null
250
- * omitStages:
251
- * - RequestReceived
252
- * rules:
253
- * - level: RequestResponse
254
- * resources:
255
- * - resources:
256
- * - pods
257
- * `,
258
- * },
259
- * },
260
- * },
261
- * },
262
- * upgradeStrategy: {
263
- * drain: true,
264
- * maxUnavailableWorker: "20%",
265
- * },
266
- * },
267
- * });
268
- * ```
40
+ * The `rancher.io/imported-cluster-version-management` annotation controls the version-management feature for an imported cluster.
269
41
  *
270
- * ### Creating Rancher v2 RKE cluster with cluster agent customization. For Rancher v2.7.5 and above.
42
+ * Expected values: "true", "false", or "system-default".
271
43
  *
272
44
  * ```typescript
273
45
  * import * as pulumi from "@pulumi/pulumi";
274
46
  * import * as rancher2 from "@pulumi/rancher2";
275
47
  *
276
- * const foo = new rancher2.Cluster("foo", {
277
- * name: "foo",
278
- * description: "Terraform cluster with agent customization",
279
- * rkeConfig: {
280
- * network: {
281
- * plugin: "canal",
282
- * },
48
+ * // Create a new rancher2 imported Cluster
49
+ * const foo_imported = new rancher2.Cluster("foo-imported", {
50
+ * name: "foo-imported",
51
+ * description: "Foo rancher2 imported cluster",
52
+ * annotations: {
53
+ * "rancher.io/imported-cluster-version-management": "false",
283
54
  * },
284
- * clusterAgentDeploymentCustomizations: [{
285
- * appendTolerations: [{
286
- * effect: "NoSchedule",
287
- * key: "tolerate/control-plane",
288
- * value: "true",
289
- * }],
290
- * overrideAffinity: `{
291
- * \\"nodeAffinity\\": {
292
- * \\"requiredDuringSchedulingIgnoredDuringExecution\\": {
293
- * \\"nodeSelectorTerms\\": [{
294
- * \\"matchExpressions\\": [{
295
- * \\"key\\": \\"not.this/nodepool\\",
296
- * \\"operator\\": \\"In\\",
297
- * \\"values\\": [
298
- * \\"true\\"
299
- * ]
300
- * }]
301
- * }]
302
- * }
303
- * }
304
- * }
305
- * `,
306
- * overrideResourceRequirements: [{
307
- * cpuLimit: "800",
308
- * cpuRequest: "500",
309
- * memoryLimit: "800",
310
- * memoryRequest: "500",
311
- * }],
312
- * }],
313
55
  * });
314
56
  * ```
315
57
  *
316
- * ### Creating Rancher v2 RKE cluster with cluster agent scheduling customization. For Custom and Imported clusters provisioned by Rancher v2.11.0 and above.
58
+ * ### Creating Rancher v2 imported cluster with custom configuration. For Rancher v2.11.0 and above.
317
59
  *
318
- * ```typescript
319
- * import * as pulumi from "@pulumi/pulumi";
320
- * import * as rancher2 from "@pulumi/rancher2";
321
- *
322
- * const foo = new rancher2.Cluster("foo", {
323
- * name: "foo",
324
- * description: "Terraform cluster with agent customization",
325
- * rkeConfig: {},
326
- * clusterAgentDeploymentCustomizations: [{
327
- * schedulingCustomizations: [{
328
- * priorityClasses: [{
329
- * preemptionPolicy: "PreemptLowerPriority",
330
- * value: 1000000000,
331
- * }],
332
- * podDisruptionBudgets: [{
333
- * minAvailable: "1",
334
- * }],
335
- * }],
336
- * }],
337
- * });
338
- * ```
339
- *
340
- * ### Creating Rancher v2 RKE cluster with Pod Security Admission Configuration Template (PSACT). For Rancher v2.7.2 and above.
60
+ * This configuration can be used to indicate that system images (such as the rancher-agent) should be pulled from an unauthenticated private registry. This can be used for all imported cluster types, including imported hosted clusters (AKS, EKS, GKE).
341
61
  *
342
62
  * ```typescript
343
63
  * import * as pulumi from "@pulumi/pulumi";
344
64
  * import * as rancher2 from "@pulumi/rancher2";
345
65
  *
346
- * // Custom PSACT (if you wish to use your own)
347
- * const foo = new rancher2.PodSecurityAdmissionConfigurationTemplate("foo", {
348
- * name: "custom-psact",
349
- * description: "This is my custom Pod Security Admission Configuration Template",
350
- * defaults: {
351
- * audit: "restricted",
352
- * auditVersion: "latest",
353
- * enforce: "restricted",
354
- * enforceVersion: "latest",
355
- * warn: "restricted",
356
- * warnVersion: "latest",
357
- * },
358
- * exemptions: {
359
- * usernames: ["testuser"],
360
- * runtimeClasses: ["testclass"],
361
- * namespaces: [
362
- * "ingress-nginx",
363
- * "kube-system",
364
- * ],
365
- * },
366
- * });
367
- * const fooCluster = new rancher2.Cluster("foo", {
368
- * name: "foo",
369
- * description: "Terraform cluster with PSACT",
370
- * defaultPodSecurityAdmissionConfigurationTemplateName: "<name>",
371
- * rkeConfig: {
372
- * network: {
373
- * plugin: "canal",
374
- * },
66
+ * // Create a new rancher2 imported Cluster with custom configuration
67
+ * const foo_imported = new rancher2.Cluster("foo-imported", {
68
+ * name: "foo-imported",
69
+ * importedConfig: {
70
+ * privateRegistryUrl: "test.io",
375
71
  * },
376
72
  * });
377
73
  * ```