普卢米:空堆栈

时间:2019-04-16 15:11:05

标签: pulumi

我要列出当前堆栈时得到以下输出:

enter image description here

我不太清楚为什么会收到此消息。

这是我的项目:

enter image description here

这里有代码:

import * as k8s from "@pulumi/kubernetes";

const appLabels = { app: "nginx" };
const deployment = new k8s.apps.v1.Deployment("nginx", {
    spec: {
        selector: { matchLabels: appLabels },
        replicas: 1,
        template: {
            metadata: { labels: appLabels },
            spec: { containers: [{ name: "nginx", image: "nginx" }] }
        }
    }
});
export const name = deployment.metadata.apply(m => m.name);

我尝试up当前资源:

enter image description here

1 个答案:

答案 0 :(得分:0)

因为您尚未使用status_code创建任何资源。 pulumi up仅显示有关当前堆栈状态的信息。运行pulumi stack并接受创建资源后,pulumi up会向您显示资源已创建。

相关问题