Looking into the `pulumi import` command, where ca...
# getting-started
f
Looking into the
pulumi import
command, where can I find the
type-token
for a given resource? https://www.pulumi.com/docs/reference/cli/pulumi_import/ Also is it possible to import a resource that the provider does not fully cover?
@tall-librarian-49374 @billowy-army-68599 what is your advice on mix-and-matching pulumi and az cli when setting up a single resource? Az cli is used to work around features not covered by pulumi. I'd like to be able to: 1. pulumi up: create the resource if it does not exist 2. set properties that are not supported in pulumi using the az cli and some outputs from step 1. 3. make sure pulumi up is not going to fail or revert all changes made at step 2 the next time I want to update my stack.
t
Remind me which language are you using?
f
@tall-librarian-49374 C#, but it should not matter in that case.
@tall-librarian-49374did you have any thoughts on this thread?
t
where can I find the 
type-token
 for a given resource?
In the docs for each resource, e.g. https://www.pulumi.com/docs/reference/pkg/azure-native/storage/storageaccount/#import
Also is it possible to import a resource that the provider does not fully cover?
Not sure I understand exactly. To import something, it should be expressible with Pulumi code, so I guess no?
what is your advice on mix-and-matching pulumi and az cli when setting up a single resource?
There isn’t a great story for .NET. You could call them completely separately from a CI pipeline or make a trick similar to what’s described here but this will invoke your CLI on every run https://blog.headforcloud.com/2020/02/09/pulumi-azure-static-sites/
f
Thanks a lot @tall-librarian-49374for your answers on type-token and import limitations. That link shows a pretty interesting work around too, I may give it a try using the Graph SDK instead. By "this will invoke your CLI on every run", this will be on every deploy, not on every update right?
t
every deploy, not on every update
What’s the difference? The example above will run on every program execution, so even on preview. There is a flag to check if you are in preview and short-circuit if needed.
f
Sorry @tall-librarian-49374, "this will invoke your CLI" on every preview (pulumi up) or actual deployment of the update (yes to pulumi up)?
t
By default, on every execution, so previews and updates