fresh-hospital-81544
05/25/2021, 4:56 AMimport * as k8s from "@pulumi/kubernetes";
// Deploy the latest version of the stable/wordpress chart.
const wordpress = new k8s.helm.v3.Chart("wpdev", {
repo: "stable",
chart: "wordpress",
version: "9.0.3",
});
// Export the public IP for WordPress.
const frontend = wordpress.getResource("v1/Service", "wpdev-wordpress");
export const frontendIp = frontend.status.loadBalancer.ingress[0].ip;
Is there a way to get this code to run as is or must it be modified with apply like so
import * as k8s from "@pulumi/kubernetes";
// Deploy the latest version of the stable/wordpress chart.
const wordpress = new k8s.helm.v3.Chart("wpdev", {
repo: "stable",
chart: "wordpress",
version: "9.0.3",
});
// Export the public IP for WordPress.
const frontend = wordpress.apply(wordpress => wordpress.getResource("v1/Service", "wpdev-wordpress"));
export const frontendIp = frontend.apply(frontend=>frontend.status.loadBalancer.ingress[0].ip);
Thanks