elegant-dress-88912
12/12/2019, 5:29 AMelegant-dress-88912
12/12/2019, 5:30 AMbored-jackal-93148
12/12/2019, 5:30 AM| undefined
bored-jackal-93148
12/12/2019, 5:30 AMbored-jackal-93148
12/12/2019, 5:30 AMexport const foo = undefined
bored-jackal-93148
12/12/2019, 5:30 AMlet x: string | undefined
elegant-dress-88912
12/12/2019, 5:30 AMbored-jackal-93148
12/12/2019, 5:30 AMexport x
will workambitious-ram-5811
12/12/2019, 5:30 AMdefault(Type)
was a thing but oh well - just write let serviceAccountPrivateKey: pulumi.Output<string>? = undefined
bored-jackal-93148
12/12/2019, 5:31 AMelegant-dress-88912
12/12/2019, 5:32 AMexport x
works because let x: string | undefined
also assigns default type valueambitious-ram-5811
12/12/2019, 5:33 AMbored-jackal-93148
12/12/2019, 5:33 AMelegant-dress-88912
12/12/2019, 5:50 AM// somewhere in index.ts
let serviceAccount: TypeOfServiceAccount;
export let serviceAccountPrivateKey = pulumi.Output("");
if (config.createServiceAccount) {
serviceAccount = new TypeOfServiceAccount(...)
const serviceAccountKey = new ...
serviceAccountPrivateKey = serviceAccountKey.PrivateKey
}
So serviceAccount and serviceAccountPrivateKey are global vars and can be used later, private key is exported during declaration, serviceAccountKey is local var in if
block cause I don't need it elsewhereelegant-dress-88912
12/12/2019, 6:37 AMlet
only `Output`'s above if
because I can instantiate real objects only inside if
and later usage of declared serviceAccount will cause error 'usage before assignment'adamant-postman-86832
12/12/2019, 10:32 AMbetter-actor-92669
12/12/2019, 11:02 AMgcp:sql:DatabaseInstance (cloud_pgsql_main):
error: Error, failed to create instance smth-pulumi-1-psql-main: googleapi: Error 403: The client is not authorized to make this request., notAuthorized
Reference to a class:
https://github.com/pulumi/pulumi-gcp/blob/d5c103b63474e73b7a0ea0639a6e162be70726ac/sdk/python/pulumi_gcp/sql/database_instance.py#L12 (GCP Python).
I use a separate service account to issue pulumi API calls. Both $GOOGLE_APPLICATION_CREDENTIALS
and $GOOGLE_CLOUD_KEYFILE_JSON
are set. I have assigned a CloudSQL Admin Role for this service account. I also tried to make it an owner of the entire project, but it doesn't help.
Thank you so much in advance!glamorous-waitress-51149
12/12/2019, 11:28 AMglamorous-waitress-51149
12/12/2019, 11:28 AMconst databasePassword = config.requireSecret("databasePassword")
glamorous-waitress-51149
12/12/2019, 11:29 AMconst cluster = new aws.rds.Cluster("default", {
masterPassword: databasePassword,
glamorous-waitress-51149
12/12/2019, 11:32 AMmasterPassword
is Input<string>
but databasePasssword
is Output<string>
glamorous-waitress-51149
12/12/2019, 11:32 AMconfig.requireSecret("databasePassword").get()
but docs suggest not to do thiscool-egg-852
12/12/2019, 3:27 PMrhythmic-hair-33677
12/12/2019, 6:49 PMapply
method on an instance of k8s.apiextensions.CustomResource
. Is there a workaround to perform an action after the object is applied to the cluster?rhythmic-hair-33677
12/12/2019, 7:16 PMthankful-optician-22583
12/12/2019, 8:00 PMthankful-optician-22583
12/12/2019, 8:00 PMthankful-optician-22583
12/12/2019, 8:03 PMcrooked-jelly-50877
12/12/2019, 10:14 PMbreezy-agency-15661
12/13/2019, 1:47 AMconst lambda = new aws.lambda.Function("myfunc", {
code: undefined,
role: ";)",
handler: "index.handler",
runtime: aws.lambda.NodeJS10dXRuntime
},
{}
);
breezy-agency-15661
12/13/2019, 1:47 AMconst lambda = new aws.lambda.Function("myfunc", {
code: undefined,
role: ";)",
handler: "index.handler",
runtime: aws.lambda.NodeJS10dXRuntime
},
{}
);