How to manage credentials¶
See also: Credential
Define a credential¶
To define a credential, in your Terraform plan create a resource of the juju_credential
type, specifying the credential’s name, cloud, authentication type, and the attributes associated with the authentication type.
resource "juju_credential" "this" {
name = "creddev"
cloud {
name = "localhost"
}
auth_type = "certificate"
attributes = {
client-cert = "/srv/cert.crt"
client-key = "/srv/cert.key"
trust-password = "S0m3P@$$w0rd"
}
}
See more:
juju_credential
(resource)
Add a credential to a model¶
Who: User with controller
superuser
or modeladmin
access.
To add a controller credential to a model, in your Terraform plan, specify it as an attribute to the model definition. For example:
resource "juju_model" "this" {
name = "development"
cloud {
name = "aws"
region = "eu-west-1"
}
credential = "juju_credential.<credential label>.name"
}
Update a credential¶
To update a credential, in your Terraform plan, update its resource definition.
See more: Resource
juju_credential
Remove a credential¶
To remove a credential, remove its resource definition from your Terraform plan.
See more: Resource
juju_credential
Contributors: @cderici, @erik-lonroth , @pedroleaoc, @pmatulis, @timclicks, @tmihoc, @wallyworld