This message was deleted.
# python
s
This message was deleted.
g
Secret values are `Output`s in runtime while building the resource graph, since they have to carry their "secrecy" to every value derived from them.
Copy code
# Start up script
r_server_startup = GITHUB_PASSWORD.apply(lambda password: f"""
#!/bin/bash
cd ~ ;
sudo apt update;
sudo apt install -y git;
sudo git clone -b {BRANCH} https://{GITHUB_USERNAME}:{password}@github.com/orgacuity/orgacuity.git;
""")
The
r_server_startup
will be a new
Output
that holds the script and is also secret, since it is derived from a secret
Output
f
Ah, thanks, @green-school-95910. I had something similar with
apply
before but just not in this fashion. I'll give it a run.
The good part is that the
apply
method is rendering because installs occur. Bad part is that the password isn't materializing in
r_startup_script
and the clone doesn't occur.
g
@full-account-26076 can you share more detail about what you're getting in the startup script? If I try the attached code (with Luiz's
.apply()
example), I see my secret in the stack output with
pulumi stack output --show-secrets
.
f
@gentle-diamond-70147 - Sorry, I got this working and it wasn't a Pulumi problem (the problem was me). Bad GitHub URL 🙄 . Thanks!
g
Glad you got it working!
💯 1
f
Honestly, smooth as butter.