juju_model (Resource)¶
A resource that represent a Juju Model.
Example Usage¶
resource "juju_model" "this" {
name = "development"
cloud {
name = "aws"
region = "eu-west-1"
}
config = {
logging-config = "<root>=INFO"
development = true
no-proxy = "jujucharms.com"
update-status-hook-interval = "5m"
}
}
Schema¶
Required¶
name
(String) The name to be assigned to the model. Changing this value will require the model to be destroyed and recreated by terraform.
Optional¶
annotations
(Map of String) Annotations for the modelcloud
(Block List) Juju Cloud where the model will operate. Changing this value will cause the model to be destroyed and recreated by terraform. (see below for nested schema)config
(Map of String) Override default model configurationconstraints
(String) Constraints imposed to this modelcredential
(String) Credential used to add the model
Read-Only¶
id
(String) The ID of this resource.type
(String) Type of the model. Set by the Juju’s API serveruuid
(String) The uuid of the model
Nested Schema for cloud
¶
Required:
name
(String) The name of the cloud
Optional:
region
(String) The region of the cloud
Import¶
Import is supported using the following syntax:
# Models can be imported using the model name
$ terraform import juju_model.development development
Limitations of Import¶
Any entries of the config
attribute specified in the Terraform configuration are ignored. You can add entries to the config
map and manage them using Terraform after import.
Once imported you must add the desired model configuration and run a Terraform apply. This will report no changes but Terraform will be tracking the specified model configuration.
The limitation is intentional. It exists as, without it, Terraform would import all model configuration including defaults. It may not be desirable to manage defaults using Terraform.