https://pulumi.com logo
Title
c

crooked-lunch-29479

04/15/2023, 3:05 PM
I’m unable to figure out how I should pass the IDs in both the methods and if passing the exact name is necessary if I pass the ID’s
b

billowy-army-68599

04/15/2023, 4:34 PM
Try the Lookup types instead. Ie Lookup instance
c

crooked-lunch-29479

04/15/2023, 4:38 PM
b

billowy-army-68599

04/15/2023, 4:39 PM
That’s if you know the instance id
c

crooked-lunch-29479

04/15/2023, 4:40 PM
I already have one deployed that I want to utilize
b

billowy-army-68599

04/15/2023, 4:41 PM
Yes you can either pass the name as it’s id or use a lookup to find it
c

crooked-lunch-29479

04/15/2023, 4:42 PM
Either my golang isn’t upto the mark or theres something I’m not able to figure out how actually pass the string as an agrument:
// Find default RDS
	rdsName := "Whatever"
	rdsID := "rds-1234567890"
	rds, err := rds.GetInstance(ctx, rdsName, rdsID)
any idea how I could transform the string ?
b

billowy-army-68599

04/15/2023, 4:43 PM
Give me a few mins
c

crooked-lunch-29479

04/15/2023, 5:03 PM
Oh damn this worked ! So is there a Lookup method for all the types ? I didn’t see this in the docs
b

billowy-army-68599

04/15/2023, 5:03 PM
Yep
c

crooked-lunch-29479

04/15/2023, 5:04 PM
Yeah, I tried LookUpRDS
Also I noticed that for the getInstance you’re able to use pulumi.ID . I think these need to be added to the docs, its super hard to figure out what to do without these things. I’ll put in a PR later on updating with examples. Thanks a lot for the help 😄 I was stuck for a bit, between this and EKS labeling issue, it was a long ass day yesterday 😄