-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from maveonair/cluster-group-resource
Cluster group resource
- Loading branch information
Showing
7 changed files
with
783 additions
and
6 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,62 @@ | ||
# incus_cluster_group | ||
|
||
Manages an Incus cluster group. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
resource "incus_cluster_group" "amd64" { | ||
name = "amd64" | ||
description = "x86-64 nodes" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
* `name` - **Required** - Name of the cluster group. | ||
|
||
* `config` - *Optional* - Map of key/value pairs of | ||
[cluster group config settings](https://linuxcontainers.org/incus/docs/main/howto/cluster_groups/#configuration-options). | ||
|
||
* `remote` - *Optional* - The remote in which the resource will be created. If | ||
not provided, the provider's default remote will be used. | ||
|
||
## Attribute Reference | ||
|
||
No attributes are exported. | ||
|
||
## Importing | ||
|
||
Cluster groups can be imported with the following command: | ||
|
||
```shell | ||
terraform import incus_cluster_group.my_group [<remote>:]<name> | ||
``` | ||
|
||
## Importing | ||
|
||
Import ID syntax: `[<remote>:]<name>` | ||
|
||
* `<remote>` - *Optional* - Remote name. | ||
* `<name>` - **Required** - Cluster group name. | ||
|
||
### Import example | ||
|
||
Example using terraform import command: | ||
|
||
```shell | ||
terraform import incus_cluster_group.my_group my_group | ||
``` | ||
|
||
Example using the import block (only available in Terraform v1.5.0 and later): | ||
|
||
```hcl | ||
resource "incus_cluster_group" "my_group" { | ||
name = "my_group" | ||
} | ||
import { | ||
to = incus_cluster_group.my_group | ||
id = "my_group" | ||
} | ||
``` |
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,68 @@ | ||
# incus_cluster_group_assignment | ||
|
||
Manages an Incus cluster group assignment. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
resource "incus_cluster_group" "amd64" { | ||
name = "amd64" | ||
description = "x86-64 nodes" | ||
} | ||
resource "incus_cluster_group_assignment" "node_11" { | ||
cluster_group = incus_cluster_group.amd64.name | ||
member = "node_1" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
* `cluster_group` - **Required** - Name of the cluster group. | ||
|
||
* `member` - **Required** - Name of the cluster group member. | ||
|
||
* `remote` - *Optional* - The remote in which the resource will be created. If | ||
not provided, the provider's default remote will be used. | ||
|
||
## Attribute Reference | ||
|
||
No attributes are exported. | ||
|
||
## Importing | ||
|
||
Cluster groups can be imported with the following command: | ||
|
||
```shell | ||
terraform import incus_cluster_group_assignment.member [<remote>:]/<cluster_group>/<member> | ||
``` | ||
|
||
## Importing | ||
|
||
Import ID syntax: `[<remote>:]/<cluster_group>/<member>` | ||
|
||
* `<remote>` - *Optional* - Remote name. | ||
* `<cluster_group>` - **Required** - Cluster group name. | ||
* `<member>` - **Required** - Cluster group member name. | ||
|
||
### Import example | ||
|
||
Example using terraform import command: | ||
|
||
```shell | ||
terraform import incus_cluster_group_assignment.node_1 /my-cluster/node-1 | ||
``` | ||
|
||
Example using the import block (only available in Terraform v1.5.0 and later): | ||
|
||
```hcl | ||
resource "incus_cluster_group_assignment" "node_1" { | ||
cluster_group = "my-cluster" | ||
member = "node-1" | ||
} | ||
import { | ||
to = incus_cluster_group.mygroup | ||
id = "/my-cluster/node-1" | ||
} | ||
``` |
Oops, something went wrong.