swift-island-2275
10/13/2021, 9:08 AMprehistoric-activity-61023
10/13/2021, 9:18 AMswift-island-2275
10/13/2021, 9:23 AMdry-sugar-63293
10/13/2021, 10:50 AMswift-island-2275
10/13/2021, 11:04 AMprehistoric-activity-61023
10/13/2021, 11:58 AMswift-island-2275
10/13/2021, 12:00 PMprehistoric-activity-61023
10/13/2021, 12:01 PMazurekeyvault
so you can normally use Pulumi outputs without having them stored in Pulumi Service backend, see:
https://www.pulumi.com/docs/intro/concepts/secrets/#available-encryption-providersread
method on the proper Azure resource). As far as I understand, the first option I suggested would do that more or less automatically for you.swift-island-2275
10/13/2021, 12:04 PMprehistoric-activity-61023
10/13/2021, 12:06 PMswift-island-2275
10/13/2021, 12:07 PMprehistoric-activity-61023
10/13/2021, 12:07 PMexample_secret = azure.keyvault.Secret("exampleSecret",
value="szechuan",
key_vault_id=example_key_vault.id
)
swift-island-2275
10/13/2021, 12:08 PMprehistoric-activity-61023
10/13/2021, 12:09 PMsame_secret_but_different_variable = azure.keyvault.Secret("same_secret_but_different_variable", key_vault_id=example_key_vault.id)
id
property from the secret value in the first stack:
# create secret key in Azure KeyVault (not sure if the below is correct but you have already written that part)
example_secret = azure.keyvault.Secret("exampleSecret",
value="szechuan",
key_vault_id=example_key_vault.id
)
pulumi.export("example_secret_id", example_secret.id)
in another stack you can get this value using StackReference (and because it’s an identifier and not the value itself that shouldn’t be a problem for your company) and use get
method to get the resource from the cloud:
example_secret_id = GET VALUE USING STACK REFERENCE
example_secret_from_other_stack = azure.keyvault.Secret("example_secret_from_other_stack", id=example_secret_id)
swift-island-2275
10/13/2021, 12:13 PMprehistoric-activity-61023
10/13/2021, 12:13 PMswift-island-2275
10/13/2021, 12:14 PMprehistoric-activity-61023
10/13/2021, 12:14 PMswift-island-2275
10/13/2021, 12:15 PMprehistoric-activity-61023
10/13/2021, 12:15 PMget
function, considering you have some kind of handle to them. Using id
property is the best from my experience because it’s unique.swift-island-2275
10/13/2021, 12:17 PMprehistoric-activity-61023
10/13/2021, 12:17 PMswift-island-2275
10/13/2021, 12:18 PM