Check that first-class secrets work as expected in resources.
Create with secrets
When creating a resource, if the user passes a secret to an input property.
new R("r0", {prop: secret("X")})
Then the "prop" input and output should be stored as secret in the state.
Update adding secrets
Given a resource provisioned using this form:
new R("r0", {prop: "X"})
When the user updates the program to mark the property as secret and executes pulumi up.
new R("r0", {prop: secret("X")})
Then the "prop" input and output should be stored as secret in the state.
Update removing secrets
Given a resource provisioned using this form on a provider that copies inputs to outputs:
new R("r0", {prop: secret("X")})
When the user updates the program to mark the property as secret and executes pulumi up.
new R("r0", {prop: "X"})
Then the "prop" input and output should be stored as non-secret in the state.
Check that schema secrets work as expected in resources
If a property prop is marked as Sensitive in Terraform, or by the bridged provider in info.Schema{Secret: true}, then creating or updating the resource should store the value of that property as secret in the state inputs and outputs.
Creating: new R("r0", {prop: "X"})
Updating: new R("r0", {prop: "X"}) --> new R("r0", {prop: "Y"})
For the following combinations:
Check that first-class secrets work as expected in resources.
Create with secrets
When creating a resource, if the user passes a secret to an input property.
Then the "prop" input and output should be stored as secret in the state.
Update adding secrets
Given a resource provisioned using this form:
When the user updates the program to mark the property as secret and executes
pulumi up
.Then the "prop" input and output should be stored as secret in the state.
Update removing secrets
Given a resource provisioned using this form on a provider that copies inputs to outputs:
When the user updates the program to mark the property as secret and executes
pulumi up
.Then the "prop" input and output should be stored as non-secret in the state.
Check that schema secrets work as expected in resources
If a property prop is marked as Sensitive in Terraform, or by the bridged provider in
info.Schema{Secret: true}
, then creating or updating the resource should store the value of that property as secret in the state inputs and outputs.Creating:
new R("r0", {prop: "X"})
Updating:new R("r0", {prop: "X"}) --> new R("r0", {prop: "Y"})