Fix secret outputs for k8s multicloud example
MODIFY
kubernetes-ts-multicloud/aks.ts
kubernetes-ts-multicloud/aks.ts
@@ -29,10 +29,10 @@ export class AksCluster extends pulumi.ComponentResource {
super("examples:kubernetes-ts-multicloud:AksCluster", name, {}, opts);
// Generate a strong password for the Service Principal.
- const password = pulumi.secret(new random.RandomString("password", {
+ const password = new random.RandomString("password", {
length: 20,
special: true,
- }, {parent: this}).result);
+ }, {parent: this, additionalSecretOutputs: ["result"]}).result;
// Create an SSH public key that will be used by the Kubernetes cluster.
// Note: We create one here to simplify the demo, but a production deployment would probably pass

MODIFY
kubernetes-ts-multicloud/gke.ts
kubernetes-ts-multicloud/gke.ts
@@ -29,10 +29,10 @@ export class GkeCluster extends pulumi.ComponentResource {
const engineVersion = gcp.container.getEngineVersions().then(v => v.latestMasterVersion);
// Generate a strong password for the Kubernetes cluster.
- const password = pulumi.secret(new random.RandomString("password", {
+ const password = new random.RandomString("password", {
length: 20,
special: true
- }, {parent: this}).result);
+ }, {parent: this, additionalSecretOutputs: ["result"]}).result;
// Create the GKE cluster.
const k8sCluster = new gcp.container.Cluster("cluster", {

Fix secret outputs for k8s multicloud example (#361)