juju_secret (Resource)¶
A resource that represents a Juju secret.
Example Usage¶
resource "juju_secret" "my-secret" {
model = juju_model.development.name
name = "my_secret_name"
value = {
key1 = "value1"
key2 = "value2"
}
info = "This is the secret"
}
resource "juju_application" "my-application" {
#
config = {
# Reference my-secret within the plan by using the secret_id
secret = juju_secret.my-secret.secret_id
}
#
}
Schema¶
Required¶
model
(String) The model in which the secret belongs. Changing this value will cause the secret to be destroyed and recreated by terraform.value
(Map of String, Sensitive) The value map of the secret. There can be more than one key-value pair.
Optional¶
info
(String) The description of the secret.name
(String) The name of the secret.
Read-Only¶
id
(String) The ID of the secret. Used for terraform import.secret_id
(String) The ID of the secret. E.g. coj8mulh8b41e8nv6p90
Import¶
Import is supported using the following syntax:
# Secrets can be imported by using the model and secret names.
$ terraform import juju_secret.secret-name testmodel:secret-name