Skip to content

Commit

Permalink
docs: Rename cached_image to image
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Mettler <[email protected]>
  • Loading branch information
maveonair committed Mar 16, 2024
1 parent 840ecfb commit 8ebab65
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
56 changes: 56 additions & 0 deletions docs/resources/image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# incus_image

Manages a locally-stored Incus image.

## Example Usage

```hcl
resource "incus_image" "xenial" {
source_remote = "ubuntu"
source_image = "xenial/amd64"
}
resource "incus_instance" "test1" {
name = "test1"
image = incus_image.xenial.fingerprint
ephemeral = false
}
```

## Argument Reference

* `source_image` - **Required** - Fingerprint or alias of image to pull.

* `source_remote` - **Required** - Name of the Incus remote from where image will
be pulled.

* `type` - *Optional* - Type of image to cache. Must be one of `container` or
`virtual-machine`. Defaults to `container`.

* `aliases` - *Optional* - A list of aliases to assign to the image after
pulling.

* `copy_aliases` - *Optional* - Whether to copy the aliases of the image from
the remote. Valid values are `true` and `false`. Defaults to `true`.

* `project` - *Optional* - Name of the project where the image will be stored.

* `remote` - *Optional* - The remote in which the resource will be created. If
not provided, the provider's default remote will be used.

## Attribute Reference

The following attributes are exported:

* `architecture` - The image architecture (e.g. amd64, i386).

* `created_at` - The datetime of image creation, in Unix time.

* `fingerprint` - The unique hash fingperint of the image.

* `copied_aliases` - The list of aliases that were copied from the
`source_image`.

## Notes

* See the Incus [documentation](https://linuxcontainers.org/incus/docs/main/howto/images_remote) for more info on default image remotes.
4 changes: 2 additions & 2 deletions docs/resources/image_publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Create an Incus image from an instance
## Example Usage

```hcl
resource "incus_cached_image" "xenial" {
resource "incus_image" "xenial" {
source_remote = "ubuntu"
source_image = "xenial/amd64"
}
resource "incus_instance" "test1" {
name = "test1"
image = incus_cached_image.xenial.fingerprint
image = incus_image.xenial.fingerprint
running = false
}
Expand Down

0 comments on commit 8ebab65

Please sign in to comment.