diff --git a/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/example.cue b/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/example.cue index c3f406ae..3e9c2ab0 100644 --- a/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/example.cue +++ b/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/example.cue @@ -7,23 +7,17 @@ import ( dagger.#Plan & { client: { - filesystem: { - "./": read: { - contents: dagger.#FS - } - } + filesystem: "./": read: contents: dagger.#FS env: { PULUMI_CONFIG_PASSPHRASE: dagger.#Secret PULUMI_ACCESS_TOKEN: dagger.#Secret } } - actions: { - rawkode: pulumi.#Up & { - stack: "test" - stackCreate: true - runtime: "nodejs" - accessToken: client.env.PULUMI_ACCESS_TOKEN - source: client.filesystem."./".read.contents - } + actions: rawkode: pulumi.#Up & { + stack: "test" + stackCreate: true + runtime: "nodejs" + accessToken: client.env.PULUMI_ACCESS_TOKEN + source: client.filesystem."./".read.contents } } diff --git a/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/pulumi.cue b/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/pulumi.cue index d477e7d3..56148ccb 100644 --- a/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/pulumi.cue +++ b/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/pulumi.cue @@ -65,11 +65,11 @@ import ( } workdir: "/src" mounts: { - "src": { + src: { dest: "/src" contents: source } - "node_modules": { + node_modules: { dest: "/src/node_modules" type: "cache" contents: core.#CacheDir & { diff --git a/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/up.sh b/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/up.sh index 1652c1af..0202d969 100644 --- a/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/up.sh +++ b/pkg/universe.dagger.io/x/david@rawkode.dev/pulumi/up.sh @@ -13,21 +13,21 @@ fi if test -v PULUMI_ACCESS_TOKEN; then if (pulumi stack ls | grep -e "^${STACK_NAME}"); then echo "Stack exists, let's refresh" - pulumi stack select ${PULUMI_STACK} + pulumi stack select "${PULUMI_STACK}" # Could be first deployment, so let's not worry about this failing pulumi config refresh --force || true else echo "Stack does not exist, let's create" - pulumi stack init ${PULUMI_STACK} + pulumi stack init "${PULUMI_STACK}" fi else # Not using Pulumi SaaS, relying on local stack files - if test -v PULUMI_STACK_CREATE && test ! -f Pulumi.${PULUMI_STACK}.yaml; then - pulumi stack init ${PULUMI_STACK} + if test -v PULUMI_STACK_CREATE && test ! -f "Pulumi.${PULUMI_STACK}.yaml"; then + pulumi stack init "${PULUMI_STACK}" fi fi -case $PULUMI_RUNTIME in +case "$PULUMI_RUNTIME" in nodejs) npm install ;; @@ -37,4 +37,4 @@ case $PULUMI_RUNTIME in ;; esac -pulumi up --stack ${PULUMI_STACK} --yes +pulumi up --stack "${PULUMI_STACK}" --yes