chore(snippets/pulumi): more commands after instance creation

This commit is contained in:
Michele Cereda
2025-01-06 17:39:06 +01:00
parent 360d25ef26
commit f90e1619c4
2 changed files with 15 additions and 2 deletions

View File

@@ -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 ] },
);

View File

@@ -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