many-knife-65312
03/03/2023, 11:42 PM.get()
function to check for existing gcp resources, but i'm struggling with the unique provider ID, does anyone have docs or tips for using .get()
?dry-keyboard-94795
03/04/2023, 1:50 AMid
probably is
• If you have a resource of the same type already, you can look at its state
TargetHttpProxy is a good example:
- pulumi docs
- TF docsstocky-restaurant-98004
03/06/2023, 6:34 PMimport
. (We need to make this more obvious.)import
and get
use the same RPC call.many-knife-65312
03/06/2023, 7:13 PMIAMBinding
resource. @stocky-restaurant-98004 when you say it's the same as the ID for import
which import do you mean?terraform import google_storage_bucket.sample sample-project/my-bucket
name
of the resource and the unique provider ID is the project NAME
and role
project NUMBER
because that's what pulumi stores in the resourcesstocky-restaurant-98004
03/08/2023, 3:46 PMVPCs can be imported using the vpc id, e.g.,
pulumi import aws:ec2/vpc:Vpc test_vpc vpc-a01106c2
That VPC id is the same value that should be passed to .get()
if you want to grab it in a Pulumi program rather than import it because behind the scenes, they both make the same API call.get()
something like "see the Import section for details on how to formulate the ID parameter"many-knife-65312
03/10/2023, 6:07 PMstocky-restaurant-98004
03/10/2023, 6:47 PM