Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add volume resize #119

Merged
merged 4 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ resource "genesiscloud_security_group" "allow-https" {
}

resource "genesiscloud_floating_ip" "floating_ip" {
name = "terraform-floating-ip"
description = "The description for you terraform floating IP."
region = local.region
version = "ipv4"
name = "terraform-floating-ip"
region = local.region
version = "ipv4"
}

resource "genesiscloud_instance" "instance" {
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ resource "genesiscloud_filesystem" "example" {

- `name` (String) The human-readable name for the filesystem.
- `region` (String) The identifier for the region this filesystem exists in.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- `size` (Number) The storage size of this filesystem given in GiB.
- The value must be at least 1.
- `type` (String) The storage type of the filesystem.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The value must be one of: ["vast"].

### Optional
Expand Down
11 changes: 5 additions & 6 deletions docs/resources/floating_ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ floating IP resource

```terraform
resource "genesiscloud_floating_ip" "floating_ip" {
name = "terraform-floating-ip"
description = "The description for you terraform floating IP."
region = "NORD-NO-KRS-1"
version = "ipv4"
name = "terraform-floating-ip"
region = "NORD-NO-KRS-1"
version = "ipv4"
}
```

Expand All @@ -28,10 +27,10 @@ resource "genesiscloud_floating_ip" "floating_ip" {

- `name` (String) The human-readable name for the floating IP.
- `region` (String) The region identifier.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- `version` (String) The version of the floating IP.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The value must be one of: ["ipv4"].

### Optional
Expand Down
14 changes: 7 additions & 7 deletions docs/resources/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ resource "genesiscloud_instance" "example" {
### Required

- `image` (String) The source image id, image slug or snapshot id of the instance. The image version can also specified together with the image slug in this format `<image-slug>:<version>`. Learn more about images [here](https://developers.genesiscloud.com/images).
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- `name` (String) The human-readable name for the instance.
- `region` (String) The region identifier.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- `type` (String) The instance type identifier. Learn more about instance types [here](https://developers.genesiscloud.com/instances#instance-types).
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.

### Optional

Expand All @@ -48,14 +48,14 @@ resource "genesiscloud_instance" "example" {
- If the value of this attribute is configured and changes, Terraform will destroy and recreate the resource.
- `metadata` (Attributes) Option to provide metadata. Currently supported is `startup_script`. (see [below for nested schema](#nestedatt--metadata))
- `password` (String, Sensitive) The password to access the instance. Your password must have upper and lower chars, digits and length between 8-72. **Please Note**: Only one of `ssh_keys` or `password` can be provided. Password is less secure - we recommend you use an SSH key-pair.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The string length must be at least 16.
- `placement_option` (String) The placement option identifier in which instances are physically located relative to each other within a zone. For example A or B.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- `reservation_id` (String) The id of the reservation the instance is associated with.
- `security_group_ids` (Set of String) The security groups of the instance. If not provided will be set to the default security group.
- `ssh_key_ids` (Set of String) The ssh keys of the instance.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))
- `volume_ids` (Set of String) The volumes of the instance.

Expand All @@ -76,7 +76,7 @@ resource "genesiscloud_instance" "example" {
Optional:

- `startup_script` (String) A plain text bash script or "cloud-config" file that will be executed after the first instance boot. It is limited to 64 KiB in size. You can use it to configure your instance, e.g. installing the NVIDIA GPU driver. Learn more about [startup scripts and installing the GPU driver](https://support.genesiscloud.com/support/solutions/articles/47001122478).
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.


<a id="nestedatt--timeouts"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/instance_status.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "genesiscloud_instance_status" "example" {
### Required

- `instance_id` (String) The id of the instance this refers to.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- `status` (String) The target instance status.
- The value must be one of: ["active" "stopped"].

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/security_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "genesiscloud_security_group" "allow-https" {

- `name` (String) The human-readable name for the security group.
- `region` (String) The region identifier.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- `rules` (Attributes List) (see [below for nested schema](#nestedatt--rules))

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ resource "genesiscloud_snapshot" "example" {
### Required

- `instance_id` (String) The id of the instance to snapshot.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- `name` (String) The human-readable name for the snapshot.

### Optional
Expand All @@ -45,7 +45,7 @@ resource "genesiscloud_snapshot" "example" {
- `created_at` (String) The timestamp when this snapshot was created in RFC 3339.
- `id` (String) The unique ID of the snapshot.
- `region` (String) The region identifier.
- `size` (Number) The storage size of this snapshot given in bytes.
- `size` (Number) The storage size of this snapshot given in GiB.
- `status` (String) The snapshot status.

<a id="nestedatt--timeouts"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/ssh_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "genesiscloud_ssh_key" "example" {

- `name` (String) The human-readable name for the SSH key.
- `public_key` (String) SSH public key.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.

### Optional

Expand Down
5 changes: 2 additions & 3 deletions docs/resources/volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ resource "genesiscloud_volume" "example" {

- `name` (String) The human-readable name for the volume.
- `region` (String) The region identifier.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The value must be one of: ["ARC-IS-HAF-1" "EUC-DE-MUC-1" "NORD-NO-KRS-1"].
- `size` (Number) The storage size of this volume given in GiB.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- The value must be at least 1.
- `type` (String) The storage type of the volume.
- If the value of this attribute changes, Terraform will destroy and recreate the resource.
- If the value of this attribute changes, the resource will be replaced.
- The value must be one of: ["hdd" "ssd"].

### Optional
Expand Down
7 changes: 3 additions & 4 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ resource "genesiscloud_security_group" "allow-https" {
}

resource "genesiscloud_floating_ip" "floating_ip" {
name = "terraform-floating-ip"
description = "The description for you terraform floating IP."
region = local.region
version = "ipv4"
name = "terraform-floating-ip"
region = local.region
version = "ipv4"
}

resource "genesiscloud_instance" "instance" {
Expand Down
7 changes: 3 additions & 4 deletions examples/resources/genesiscloud_floating_ip/resource.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
resource "genesiscloud_floating_ip" "floating_ip" {
name = "terraform-floating-ip"
description = "The description for you terraform floating IP."
region = "NORD-NO-KRS-1"
version = "ipv4"
name = "terraform-floating-ip"
region = "NORD-NO-KRS-1"
version = "ipv4"
}
13 changes: 6 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ go 1.22.0
toolchain go1.23.1

require (
github.com/genesiscloud/genesiscloud-go v1.0.9
github.com/genesiscloud/genesiscloud-go v1.0.10
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/hashicorp/terraform-plugin-docs v0.19.4
github.com/hashicorp/terraform-plugin-framework v1.12.0
github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
github.com/hashicorp/terraform-plugin-framework-validators v0.14.0
github.com/hashicorp/terraform-plugin-go v0.24.0
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.10.0
Expand All @@ -30,8 +30,7 @@ require (
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/deepmap/oapi-codegen v1.16.3 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -42,7 +41,7 @@ require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.1 // indirect
github.com/hashicorp/go-plugin v1.6.2 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.8.0 // indirect
Expand All @@ -64,7 +63,7 @@ require (
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 // indirect
github.com/oapi-codegen/runtime v1.1.1 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/posener/complete v1.2.3 // indirect
Expand All @@ -87,7 +86,7 @@ require (
golang.org/x/text v0.19.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading