white-zoo-43002
04/05/2024, 12:04 PMwhite-zoo-43002
04/05/2024, 12:17 PMsecret_config = pulumi.Config()
opensearch_secret = secret_config.get_secret('opensearch_master_user_password')
def get_secret_value(decrypted_value: str):
return decrypted_value
render_helmfile_template(HELMFILE_SECRETS_YAML,
{'registry_password': 'some-value',
'registry_host': 'some-value',
'registry_user': 'some-value'),
'opensearch_password': opensearch_secret.apply(get_secret_value),
'postgres_password': 'some-value',
'keycloak_password': 'some-value'},
'secrets.yaml')
But that doesn’t work. I am getting the following in the generated file.
## -- Secrets of OpenSearch
opensearch:
external:
password: Calling __str__ on an Output[T] is not supported.
To get the value of an Output[T] as an Output[str] consider:
1. o.apply(lambda v: f"prefix{v}suffix")
See <https://www.pulumi.com/docs/concepts/inputs-outputs> for more details.
This function may throw in a future version of Pulumi.
adventurous-butcher-54166
04/05/2024, 12:56 PM.apply
on a single output or use pulumi.Output.all
if you have to await many outputs.
See some examples here:
https://gist.github.com/olafurnielsen/c5bb06492e5456761e7fec584718a4a6white-zoo-43002
04/05/2024, 6:16 PM