juju_offer (Resource)¶
A resource that represent a Juju Offer.
Example Usage¶
resource "juju_offer" "myoffer" {
model_uuid = juju_model.development.uuid
application_name = juju_application.percona-cluster.name
endpoints = ["server"]
}
// an offer can then be used in an cross model integration as below:
resource "juju_integration" "myintegration" {
model_uuid = juju_model.development-destination.name
application {
name = juju_application.wordpress.name
endpoint = "db"
}
application {
offer_url = juju_offer.myoffer.url
}
}
Schema¶
Required¶
application_name(String) The name of the application. Changing this value will cause the offer to be destroyed and recreated by terraform.endpoints(Set of String) The endpoint names. Changing this value will cause the offer to be destroyed and recreated by terraform.model_uuid(String) The UUID of the model to operate in. Changing this value will cause the offer to be destroyed and recreated by terraform.
Optional¶
allow_force_destroy(Boolean) Allows the offer to be force-destroyed if it has active connections. Force destroy may not actually be used if not necessary.name(String) The name of the offer. Changing this value will cause the offer to be destroyed and recreated by terraform.timeouts(Block, Optional) (see below for nested schema)
Read-Only¶
id(String) The ID of this resource.url(String) The offer URL.
Nested Schema for timeouts¶
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Import¶
Import is supported using the following syntax:
# Offers can be imported by using the URL as in the juju show-offers output.
# Example:
# $juju show-offer mysql
# Store URL Access Description Endpoint Interface Role
# mycontroller admin/db.mysql admin MariaDB Server is one of the most ... mysql mysql provider
$ terraform import juju_offer.db admin/db.mysql