diff --git a/snippets/pulumi/aws/run commands after instance creation.ts b/snippets/pulumi/aws/run commands after instance creation.ts index bcc66f5..a55c95f 100644 --- a/snippets/pulumi/aws/run commands after instance creation.ts +++ b/snippets/pulumi/aws/run commands after instance creation.ts @@ -1,7 +1,7 @@ /** - * Run commands after creation + * Run commands after instance creation * ----------------------------------------------------------------------------- - * + * No need for dependency when using values from the instance in the command with apply(). * Replace the 'command.local.Command' resource to run it again: * `pulumi up --replace "urn:pulumi:any::stackName::command:local:Command::ansiblePlaybook-ssh"` **/ @@ -41,3 +41,12 @@ instance_output.id.apply(instanceId => new command.local.Command( `, }, )); + +new command.local.Command( + "make", + { + dir: "someDir", + create: `make thisTarget`, + }, + { dependsOn: [ instance_output ] }, +); diff --git a/snippets/pulumi/commands.fish b/snippets/pulumi/commands.fish index 56ae344..1ff1829 100644 --- a/snippets/pulumi/commands.fish +++ b/snippets/pulumi/commands.fish @@ -78,3 +78,7 @@ PULUMI_K8S_DELETE_UNREACHABLE='true' pulumi destroy pulumi state move --source 'organization/utils/dev' --dest 'organization/iam/dev' \ 'urn:pulumi:dev::utils::aws:iam/role:Role::rdsToS3Exporter' \ 'urn:pulumi:dev::utils::aws:iam/rolePolicy:RolePolicy::rdsToS3Exporter-allowExportingSnapshotsToS3' + +# Upgrade providers' versions +jq '.dependencies."@pulumi/aws" |= "6.66.2"' 'package.json' | sponge 'package.json' \ +&& pulumi install && pulumi update --suppress-outputs