-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Fabian Mettler <[email protected]>
- Loading branch information
Showing
2 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters