https://pulumi.com logo
#general
Title
# general
c

creamy-monkey-35142

03/29/2024, 3:56 PM
@echoing-dinner-19531 and guys, In Python for Pulumi Dynamic Resource Provider, I have Inputs like
Copy code
"data_sources": [
            {
                "type": "ADMIN",
                "host": "<http://ohan-dev-c1pxc-04.bds.lc|ohan-dev-c1pxc-04.bds.lc>",
                "port": "3306",
                "username": "example",
                "password": "secret"
            }
        ],
How I add
password
as Input secret in this case?
e

echoing-dinner-19531

03/29/2024, 4:05 PM
Just using
pulumi.Output.secret
should work, I think the dynamic provider will just see it as a string but statefile should keep it recorded as secret
c

creamy-monkey-35142

03/29/2024, 4:06 PM
can you give me an example for this case
my expectation is the
password
value in Input & Output will be an encrypted string in json state file
e

echoing-dinner-19531

03/29/2024, 4:11 PM
pulumi.Output.secret("secret")
should be all thats needed
I don't know if dynamic providers support secrets on outputs, but you could use the "additional_secret_outputs" resource option to tell the engine to mark it secret
c

creamy-monkey-35142

03/29/2024, 4:13 PM
e

echoing-dinner-19531

03/29/2024, 4:21 PM
Ah yup
additional_secret_outputs