lemon-night-89661
05/24/2020, 10:11 PM<http://api-vvf3g61k>
(or similar)lemon-night-89661
05/24/2020, 10:13 PMsrv_name1
to s[0][0].metadata.name
instead. Doing this will set the environment variable to some other Output
object, not the metadata name I’m looking for.sparse-state-34229
05/24/2020, 10:14 PMlemon-night-89661
05/24/2020, 10:21 PMOutput.all().apply(lambda …)
is not very readable.lemon-night-89661
05/24/2020, 10:24 PMOutput.all([central_api_deployment.status])
instead of Output.all([central_api_deployment])
?sparse-state-34229
05/24/2020, 10:42 PMsparse-state-34229
05/24/2020, 10:43 PMlemon-night-89661
05/24/2020, 10:49 PMsparse-state-34229
05/24/2020, 10:49 PMbulky-match-1583
05/25/2020, 10:37 AMbulky-match-1583
05/25/2020, 10:38 AMcluster_info = pulumi.Output.all(cluster.name, cluster.endpoint, cluster.master_auth)
kube_config = cluster_info.apply(
lambda info: """apiVersion: v1
clusters:
- cluster:
certificate-authority-data: {0}
server: https://{1}
name: {2}
contexts:
- context:
cluster: {2}
user: {2}
name: {2}
current-context: {2}
kind: Config
preferences: {{}}
users:
- name: {2}
user:
auth-provider:
config:
cmd-args: config config-helper --format=json
cmd-path: gcloud
expiry-key: '{{.credential.token_expiry}}'
token-key: '{{.credential.access_token}}'
name: gcp
""".format(cluster_info[2]['clusterCaCertificate'], cluster_info[1], '{0}_{1}_{2}'.format(
config.customer_name, config.env_name, config.gcp_region)))
bulky-match-1583
05/25/2020, 10:39 AMbulky-match-1583
05/25/2020, 10:55 AMcrooked-memory-97998
05/27/2020, 6:11 AMserver.public_ip
, however when I print that (I actually render it in a jinja2 template), its an pulumi.output.Output Object. I read in the documentation that this is because of the asynchroneous nature of the object. I tried to convert that Output object to a string using pulumi.Output.concat()
, however that did not do the trick. I guess I would need to somehow define the dependency bevor using that, however I am a bit lost on how to do all that. Can someone explain, or has an example on how to get IP addresses from servers for further processing?sparse-state-34229
05/27/2020, 6:14 AMsparse-state-34229
05/27/2020, 6:14 AMpulumi stack output -j
to process?crooked-memory-97998
05/27/2020, 6:18 AMcrooked-memory-97998
05/27/2020, 6:19 AMpulumi stack output -j
does, but it does not really sound like I could render my custom inventory template.sparse-state-34229
05/27/2020, 6:20 AMsparse-state-34229
05/27/2020, 6:21 AMcrooked-memory-97998
05/27/2020, 6:24 AMcrooked-memory-97998
05/27/2020, 6:25 AMsparse-state-34229
05/27/2020, 6:26 AMcrooked-memory-97998
05/27/2020, 6:29 AMsparse-state-34229
05/27/2020, 6:30 AMcrooked-memory-97998
05/27/2020, 6:31 AMsparse-state-34229
05/27/2020, 6:32 AMcrooked-memory-97998
05/27/2020, 6:35 AM.wait()
method that would block until all tasks related to the object have finished_crooked-memory-97998
05/27/2020, 6:35 AMsparse-state-34229
05/27/2020, 6:35 AM