https://pulumi.com logo
Title
l

lemon-agent-27707

03/29/2023, 3:27 PM
Major Pulumi Deployments update shipped today, complete with overhauled documentation. Happy to answer any questions ya'll may have! https://pulumi-community.slack.com/archives/CB36DSVSA/p1680103635675449
d

dry-journalist-60579

03/29/2023, 5:48 PM
Amazing! Thank you! Question: if I’ve already set up Pulumi Deployments via the UI, is there a smooth way to transition to the Pulumi Service Provider in code? Or do I just need to recreate the settings, delete them manually from the UI, and then
pulumi up
the new stack with the deployment settings?
(Just following up here)
And is this available in the python
pulumi_pulumiservice
package yet?
or is it only TS?
l

lemon-agent-27707

03/30/2023, 5:00 PM
@dry-journalist-60579 the provider update did not end up making it in before the blog post went out yesterday. Our apologies for that! The provider should be ready next week. You can follow this PR https://github.com/pulumi/pulumi-pulumiservice/pull/122 and this issue https://github.com/pulumi/pulumi-pulumiservice/issues/97 to get notifications.
We expect that you should be able to run
pulumi import
to import existing stack settings that have been configured through the UI.
d

dry-journalist-60579

03/30/2023, 5:05 PM
ah, amazing, thank you!!
will keep an eye out
c

cuddly-flower-91328

04/04/2023, 10:47 AM
Woo! We just started using deployments last week.
r

red-match-15116

04/07/2023, 3:33 AM
@dry-journalist-60579 we just shipped the ability to define deployment settings in code in the latest version of the pulumiservice provider. Here's an example in python: https://github.com/pulumi/pulumi-pulumiservice/blob/main/examples/py-deployment-settings/__main__.py It's also possible to import existing settings using
pulumi import pulumiservice:index:DeploymentSettings my_settings [org]/[project]/[stack]
I need to update the docs still to add the import information but wanted to get this in your hands to take it for a spin.
d

dry-journalist-60579

04/07/2023, 12:52 PM
Amazing! I’ll check it out next week. Thank you for the update!
Would you create a separate stack to define all the DeploymentSettings for every other stack or embed the DeploymentSettings within each stack that will be using Pulumi Deployments? CC @red-match-15116
r

red-match-15116

04/14/2023, 11:48 PM
You can do either! Internally, we have one stack that manages all deployment settings (including its own).
d

dry-journalist-60579

04/14/2023, 11:53 PM
Sweet, thank you!
l

lemon-agent-27707

04/15/2023, 2:28 AM
If you'd be interested we could write a blog post about it and open source the template that we created for internal use.
d

dry-journalist-60579

04/15/2023, 2:39 PM
That sounds like a good post 🙂
@red-match-15116 I’m trying to figure out how to import the Deployment configuration… Let’s say I have a stack
project-1/stack-1
and I’m trying to import that stack’s deployment configuration into a one-stack-that-manages-all-deployments called
deployments/prod
. What would the import command look like? I’m getting:
` error: Preview failed: unknown resource type 'pulumiservice:index:DeploymentSettings'`
Oh, I think I need to install
pulumi-pulumiservice
🙂
(yup, ok, sorry about that!)
r

red-match-15116

04/26/2023, 3:46 PM
heh no worries! sounds like you got it working?
d

dry-journalist-60579

04/26/2023, 4:05 PM
Yup, like a charm! Thank you again!
@red-match-15116 do you somehow automatically detect all the other projects/stacks in your org and iterate over them to create deployment settings or do you just explicitly define each one? Right now I’m going with the latter, but I’m just curious.
image.png
r

red-match-15116

04/26/2023, 4:19 PM
Currently we are explicitly defining each one (we have 1000s of stacks and only a subset are using deployments), but you might be able to use the ListStacks API endpoint to get a list of stacks and iterate over them if you wanted to.
d

dry-journalist-60579

04/26/2023, 4:49 PM
1000s of stacks
Daaaaaaaamnnn, I’d be scared to see Pulumi’s Pulumi bill :)