Skip to content

Commit

Permalink
Merge pull request #49 from maveonair/resource-naming-consistency
Browse files Browse the repository at this point in the history
Resource naming consistency
  • Loading branch information
stgraber authored Mar 20, 2024
2 parents 0e96c0e + 8ebab65 commit 9e43b5b
Show file tree
Hide file tree
Showing 19 changed files with 475 additions and 475 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ make
```shell
make acc
# or run an individual test
TESTARGS="-run TestAccCachedImage_basicVM" make testacc
TESTARGS="-run TestAccImage_basicVM" make testacc
# increase test verbosity. options are trace, debug, info, warn, or error (default)
TF_LOG=info make testacc
```
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/cached_image.md → docs/resources/image.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# incus_cached_image
# incus_image

Manages a locally-stored Incus image.

## 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
ephemeral = false
}
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# incus_publish_image
# incus_image_publish

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
}
resource "incus_publish_image" "test1" {
resource "incus_image_publish" "test1" {
instance = incus_instance.test1
aliases = ["test1_img"]
}
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "incus_storage_pool" "pool1" {
driver = "zfs"
}
resource "incus_volume" "volume1" {
resource "incus_storage_volume" "volume1" {
name = "myvolume"
pool = incus_storage_pool.pool1.name
}
Expand All @@ -43,7 +43,7 @@ resource "incus_instance" "instance1" {
type = "disk"
properties = {
path = "/mount/point/in/instance"
source = incus_volume.volume1.name
source = incus_storage_volume.volume1.name
pool = incus_storage_pool.pool1.name
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# incus_snapshot
# incus_instance_snapshot

Manages a snapshot of an Incus instance.

Expand All @@ -11,7 +11,7 @@ resource "incus_instance" "instance" {
ephemeral = false
}
resource "incus_snapshot" "snap1" {
resource "incus_instance_snapshot" "snap1" {
name = "my-snapshot-1"
instance = incus_instance.instance.name
}
Expand Down
12 changes: 6 additions & 6 deletions docs/resources/volume.md → docs/resources/storage_volume.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# incus_volume
# incus_storage_volume

Manages an Incus volume.
Manages an Incus storage volume.

## Example Usage

Expand All @@ -10,7 +10,7 @@ resource "incus_storage_pool" "pool1" {
driver = "zfs"
}
resource "incus_volume" "volume1" {
resource "incus_storage_volume" "volume1" {
name = "myvolume"
pool = incus_storage_pool.pool1.name
}
Expand Down Expand Up @@ -63,20 +63,20 @@ Import ID syntax: `[<remote>:][<project>]/<pool>/<name>`
Example using terraform import command:

```shell
$ terraform import incus_volume.myvol proj/pool1/vol1
$ terraform import incus_storage_volume.myvol proj/pool1/vol1
```

Example using the import block (only available in Terraform v1.5.0 and later):

```hcl
resource "incus_volume" "myvol" {
resource "incus_storage_volume" "myvol" {
name = "vol1"
pool = "pool1"
project = "proj"
}
import {
to = incus_volume.myvol
to = incus_storage_volume.myvol
id = "proj/pool1/vol1"
}
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# incus_volume_copy
# incus_storage_volume_copy

Copies an existing Incus volume.
Copies an existing Incus storage volume.

## Example Usage

Expand All @@ -10,16 +10,16 @@ resource "incus_storage_pool" "pool1" {
driver = "dir"
}
resource "incus_volume" "volume1" {
resource "incus_storage_volume" "volume1" {
name = "myvolume"
pool = incus_storage_pool.pool1.name
}
resource "incus_volume_copy" "volume1_copy" {
resource "incus_storage_volume_copy" "volume1_copy" {
name = "myvolume_copy"
pool = incus_storage_pool.pool1.name
source_pool = incus_storage_pool.pool1.name
source_name = incus_volume.volume1.name
source_name = incus_storage_volume.volume1.name
}
```

Expand Down
Loading

0 comments on commit 9e43b5b

Please sign in to comment.