sparse-intern-71089
09/02/2023, 12:03 AMlittle-cartoon-10569
09/03/2023, 11:04 PMthousands-toothbrush-98776
09/04/2023, 5:17 PMlittle-cartoon-10569
09/04/2023, 8:09 PMtall-librarian-49374
09/05/2023, 8:06 AMthousands-toothbrush-98776
09/05/2023, 6:26 PMpulumi-aws
I expect (hope) many people would use this provider in different configurations and different numbers of people. And not everyone would use GitHub. I’ll look into it though, as well as other vaults. Thank you!thousands-toothbrush-98776
09/05/2023, 6:26 PMlittle-cartoon-10569
09/05/2023, 6:54 PMthousands-toothbrush-98776
09/09/2023, 3:16 AMimport pulumi_aws
provider = pulumi_aws.Provider("awseast", region="us-east-2")
bucket = aws.s3.Bucket("bucket", ...) # etc
Let’s say I want to modify the pulumi-provider-boilerplate to call a REST API to GET a random number. I want my Python pulumi project to use the same pattern as the AWS provider, by passing api_key to the provider constructor:
import pulumi_xyz
provider = pulumi_xyz.Provider("myprovider", api_key="my_api_key")
myrandom = provider.Random("myrandom", length=2)
So my question is, do you know what part of the boilerplate code I would need to change so that (1) I can make my eventual Python code look like that and (2) the provider has a saved api key available at the time Random.Create()
(in provider/provider.go ) is called?little-cartoon-10569
09/10/2023, 9:11 PMtall-librarian-49374
09/11/2023, 7:04 AMthousands-toothbrush-98776
09/12/2023, 8:23 PMlittle-cartoon-10569
09/13/2023, 10:40 PM@pulumi/aws/Provider
) and AWS. The aws Provider instance makes a connection to AWS (the "real provider"), but (I hope) it doesn't retain in memory the credentials used to make that connection.