Skip to content

Commit da2c14f

Browse files
authored
Merge pull request #250 from SpiffyEight77/feat/incus-image-alias
Implement incus image alias nested block
2 parents e0e7c46 + 421cfae commit da2c14f

File tree

3 files changed

+371
-145
lines changed

3 files changed

+371
-145
lines changed

docs/resources/image.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,28 @@ resource "incus_instance" "test1" {
1919
}
2020
```
2121

22+
## Image alias Example
23+
24+
```hcl
25+
resource "incus_image" "alpine" {
26+
source_image = {
27+
remote = "images"
28+
name = "alpine/edge"
29+
}
30+
31+
alias {
32+
name = "alpine"
33+
description = "Alpine Linux"
34+
}
35+
36+
alias {
37+
name = "alpine-edge"
38+
description = "Alpine Linux Edge"
39+
}
40+
}
41+
42+
```
43+
2244
## Argument Reference
2345

2446
* `source_file` - *Optional* - The image file from the local file system from which the image will be created. See reference below.
@@ -27,9 +49,6 @@ resource "incus_instance" "test1" {
2749

2850
* `source_instance` - *Optional* - The source instance from which the image will be created. See reference below.
2951

30-
* `aliases` - *Optional* - A list of aliases to assign to the image after
31-
pulling.
32-
3352
* `project` - *Optional* - Name of the project where the image will be stored.
3453

3554
* `remote` - *Optional* - The remote in which the resource will be created. If
@@ -63,6 +82,11 @@ The `source_instance` block supports:
6382

6483
* `snapshot`- *Optional* - Name of the snapshot of the source instance
6584

85+
The `alias` block supports:
86+
87+
* `name` - **Required** - The name of the alias.
88+
* `description` - *Optional* - A description for the alias.
89+
6690
## Attribute Reference
6791

6892
The following attributes are exported:

0 commit comments

Comments
 (0)