Skip to content

Commit

Permalink
docs: add doc usage
Browse files Browse the repository at this point in the history
  • Loading branch information
amandahla committed Dec 17, 2024
1 parent 9a2253c commit d5d94e2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/resources/access_offer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ description: |-

A resource that represent a Juju Access Offer. Warning: Do not repeat users across different access levels.

## Example Usage

```terraform
resource "juju_access_offer" "this" {
offer_url = juju_offer.my_application_offer.url
consume = [juju_user.dev.name]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -28,3 +35,16 @@ A resource that represent a Juju Access Offer. Warning: Do not repeat users acro
### Read-Only

- `id` (String) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
# Access Offers can be imported by using the Offer 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_access_offer.db admin/db.mysql
```
6 changes: 6 additions & 0 deletions examples/resources/juju_access_offer/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Access Offers can be imported by using the Offer 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_access_offer.db admin/db.mysql
4 changes: 4 additions & 0 deletions examples/resources/juju_access_offer/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "juju_access_offer" "this" {
offer_url = juju_offer.my_application_offer.url
consume = [juju_user.dev.name]
}

0 comments on commit d5d94e2

Please sign in to comment.