From 0b5721f9f5ccea175680859ffa3d756fb917faa0 Mon Sep 17 00:00:00 2001 From: "duc.do" Date: Fri, 9 Aug 2024 11:56:30 +0700 Subject: [PATCH 1/2] feat: update docs and change logs --- .gitignore | 6 +- CHANGELOG.md | 26 ++++- docs/data-sources/floating_ip.md | 89 +++++++++++++++ .../data-sources/floating_ip_rule_instance.md | 92 +++++++++++++++ .../floating_ip_rule_ip_address.md | 86 ++++++++++++++ docs/data-sources/instance.md | 56 +++++++++ docs/data-sources/instance_group.md | 107 ++++++++++++++++++ docs/data-sources/instance_group_policy.md | 82 ++++++++++++++ docs/data-sources/ssh_key.md | 1 + docs/index.md | 2 +- docs/resources/floating_ip.md | 82 ++++++++++++++ docs/resources/instance.md | 57 ++++++++++ docs/resources/instance_group.md | 43 +++++++ 13 files changed, 724 insertions(+), 5 deletions(-) create mode 100644 docs/data-sources/floating_ip.md create mode 100644 docs/data-sources/floating_ip_rule_instance.md create mode 100644 docs/data-sources/floating_ip_rule_ip_address.md create mode 100644 docs/data-sources/instance.md create mode 100644 docs/data-sources/instance_group.md create mode 100644 docs/data-sources/instance_group_policy.md create mode 100644 docs/resources/floating_ip.md create mode 100644 docs/resources/instance.md create mode 100644 docs/resources/instance_group.md diff --git a/.gitignore b/.gitignore index a9bf273..f076b33 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,8 @@ go.work # .log files *.log -*.log.* \ No newline at end of file +*.log.* + +.bin/* +.bin +.bin/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b76e247..c51b00d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ -## 0.1.0 (Unreleased) - -FEATURES: +## [0.1.0] - 2024-08-09 +### Data source +- Floating IP +- Floating IP rule +- Instance group +- Instance +- Security group +- Security group rule +- Storage +- Flavor +- Image +- SSH key +- Storage Policy +- VPC +### Resource +- Floating IP +- Instance +- Instance group +- Security group +- Security group rule +- SSH key +- Storage +- VPC \ No newline at end of file diff --git a/docs/data-sources/floating_ip.md b/docs/data-sources/floating_ip.md new file mode 100644 index 0000000..9d44c83 --- /dev/null +++ b/docs/data-sources/floating_ip.md @@ -0,0 +1,89 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_floating_ip Data Source - terraform-provider-fptcloud" +subcategory: "" +description: |- + Get information on a floating ip for use in other resources. This data source provides all of the floating ip properties as configured on your account. + An error will be raised if the provided floating ip name does not exist in your account. +--- + +# fptcloud_floating_ip (Data Source) + +Get information on a floating ip for use in other resources. This data source provides all of the floating ip properties as configured on your account. + +An error will be raised if the provided floating ip name does not exist in your account. + +## Example Usage + +```terraform +data "fptcloud_floating_ip" "example" { + vpc_id = "your_vpc_id" + filter { + key = "id" + values = ["your_id"] + } + filter { + key = "ip_address" + values = ["your_ip_address"] + } +} + +output "show_value" { + value = data.fptcloud_floating_ip.example +} +``` + + +## Schema + +### Required + +- `vpc_id` (String) The vpc id of the floating ip + +### Optional + +- `filter` (Block Set) One or more key/value pairs on which to filter results (see [below for nested schema](#nestedblock--filter)) +- `sort` (Block List) One or more key/direction pairs on which to sort results (see [below for nested schema](#nestedblock--sort)) + +### Read-Only + +- `floating_ips` (List of Object) (see [below for nested schema](#nestedatt--floating_ips)) +- `id` (String) The ID of this resource. + + +### Nested Schema for `filter` + +Required: + +- `key` (String) Filter floating_ips by this key. This may be one of `created_at`, `id`, `ip_address`, `nat_type`, `status`, `vpc_id`. +- `values` (List of String) Only retrieves `floating_ips` which keys has value that matches one of the values provided here + +Optional: + +- `all` (Boolean) Set to `true` to require that a field match all of the `values` instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of the `values` are present in the list or set. +- `match_by` (String) One of `exact` (default), `re`, or `substring`. For string-typed fields, specify `re` to match by using the `values` as regular expressions, or specify `substring` to match by treating the `values` as substrings to find within the string field. + + + +### Nested Schema for `sort` + +Required: + +- `key` (String) Sort floating_ips by this key. This may be one of `created_at`, `id`, `ip_address`, `nat_type`, `status`, `vpc_id`. + +Optional: + +- `direction` (String) The sort direction. This may be either `asc` or `desc`. + + + +### Nested Schema for `floating_ips` + +Read-Only: + +- `created_at` (String) +- `id` (String) +- `ip_address` (String) +- `nat_type` (String) +- `status` (String) +- `vpc_id` (String) diff --git a/docs/data-sources/floating_ip_rule_instance.md b/docs/data-sources/floating_ip_rule_instance.md new file mode 100644 index 0000000..4fb2822 --- /dev/null +++ b/docs/data-sources/floating_ip_rule_instance.md @@ -0,0 +1,92 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_floating_ip_rule_instance Data Source - terraform-provider-fptcloud" +subcategory: "" +description: |- + Get information on a floating ip rule instance for use in other resources. This data source provides all of the floating ip rule instance properties as configured on your account. + An error will be raised if the provided floating ip rule instance does not exist in your account. +--- + +# fptcloud_floating_ip_rule_instance (Data Source) + +Get information on a floating ip rule instance for use in other resources. This data source provides all of the floating ip rule instance properties as configured on your account. + +An error will be raised if the provided floating ip rule instance does not exist in your account. + +## Example Usage + +```terraform +data "fptcloud_floating_ip_rule_instance" "example" { + vpc_id = "your_vpc_id" + filter { + key = "id" + values = ["your_instance_id"] + } + filter { + key = "ip_address" + values = ["your_ip_address"] + } + filter { + key = "name" + values = ["your_instance_name"] + } +} + +output "show_value" { + value = data.fptcloud_floating_ip_rule_instance.example +} +``` + + +## Schema + +### Required + +- `vpc_id` (String) The vpc id of the floating ip rule instance + +### Optional + +- `filter` (Block Set) One or more key/value pairs on which to filter results (see [below for nested schema](#nestedblock--filter)) +- `sort` (Block List) One or more key/direction pairs on which to sort results (see [below for nested schema](#nestedblock--sort)) + +### Read-Only + +- `floating_ip_rule_instance_att` (List of Object) (see [below for nested schema](#nestedatt--floating_ip_rule_instance_att)) +- `id` (String) The ID of this resource. + + +### Nested Schema for `filter` + +Required: + +- `key` (String) Filter floating_ip_rule_instance_att by this key. This may be one of `id`, `ip_address`, `name`, `type`, `vpc_id`. +- `values` (List of String) Only retrieves `floating_ip_rule_instance_att` which keys has value that matches one of the values provided here + +Optional: + +- `all` (Boolean) Set to `true` to require that a field match all of the `values` instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of the `values` are present in the list or set. +- `match_by` (String) One of `exact` (default), `re`, or `substring`. For string-typed fields, specify `re` to match by using the `values` as regular expressions, or specify `substring` to match by treating the `values` as substrings to find within the string field. + + + +### Nested Schema for `sort` + +Required: + +- `key` (String) Sort floating_ip_rule_instance_att by this key. This may be one of `id`, `ip_address`, `name`, `type`, `vpc_id`. + +Optional: + +- `direction` (String) The sort direction. This may be either `asc` or `desc`. + + + +### Nested Schema for `floating_ip_rule_instance_att` + +Read-Only: + +- `id` (String) +- `ip_address` (String) +- `name` (String) +- `type` (String) +- `vpc_id` (String) diff --git a/docs/data-sources/floating_ip_rule_ip_address.md b/docs/data-sources/floating_ip_rule_ip_address.md new file mode 100644 index 0000000..a48d612 --- /dev/null +++ b/docs/data-sources/floating_ip_rule_ip_address.md @@ -0,0 +1,86 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_floating_ip_rule_ip_address Data Source - terraform-provider-fptcloud" +subcategory: "" +description: |- + Get information on a floating ip rule address for use in other resources. This data source provides all of the floating ip rule address properties as configured on your account. + An error will be raised if the provided floating ip rule address does not exist in your account. +--- + +# fptcloud_floating_ip_rule_ip_address (Data Source) + +Get information on a floating ip rule address for use in other resources. This data source provides all of the floating ip rule address properties as configured on your account. + +An error will be raised if the provided floating ip rule address does not exist in your account. + +## Example Usage + +```terraform +data "fptcloud_floating_ip_rule_ip_address" "example" { + vpc_id = "your_vpc_id" + filter { + key = "id" + values = ["your_ip_address_id"] + } + filter { + key = "name" + values = ["your_ip_address_name"] + } +} + +output "show_value" { + value = data.fptcloud_floating_ip_rule_ip_address.example +} +``` + + +## Schema + +### Required + +- `vpc_id` (String) The vpc id of the floating ip rule ip address + +### Optional + +- `filter` (Block Set) One or more key/value pairs on which to filter results (see [below for nested schema](#nestedblock--filter)) +- `sort` (Block List) One or more key/direction pairs on which to sort results (see [below for nested schema](#nestedblock--sort)) + +### Read-Only + +- `floating_ip_rule_ip_address_att` (List of Object) (see [below for nested schema](#nestedatt--floating_ip_rule_ip_address_att)) +- `id` (String) The ID of this resource. + + +### Nested Schema for `filter` + +Required: + +- `key` (String) Filter floating_ip_rule_ip_address_att by this key. This may be one of `id`, `name`, `vpc_id`. +- `values` (List of String) Only retrieves `floating_ip_rule_ip_address_att` which keys has value that matches one of the values provided here + +Optional: + +- `all` (Boolean) Set to `true` to require that a field match all of the `values` instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of the `values` are present in the list or set. +- `match_by` (String) One of `exact` (default), `re`, or `substring`. For string-typed fields, specify `re` to match by using the `values` as regular expressions, or specify `substring` to match by treating the `values` as substrings to find within the string field. + + + +### Nested Schema for `sort` + +Required: + +- `key` (String) Sort floating_ip_rule_ip_address_att by this key. This may be one of `id`, `name`, `vpc_id`. + +Optional: + +- `direction` (String) The sort direction. This may be either `asc` or `desc`. + + + +### Nested Schema for `floating_ip_rule_ip_address_att` + +Read-Only: + +- `id` (String) +- `name` (String) +- `vpc_id` (String) diff --git a/docs/data-sources/instance.md b/docs/data-sources/instance.md new file mode 100644 index 0000000..16f71dd --- /dev/null +++ b/docs/data-sources/instance.md @@ -0,0 +1,56 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_instance Data Source - terraform-provider-fptcloud" +subcategory: "" +description: |- + Get information on a instance for use in other resources. This data source provides all of the instance properties as configured on your account. + An error will be raised if the provided instance does not exist in your account. +--- + +# fptcloud_instance (Data Source) + +Get information on a instance for use in other resources. This data source provides all of the instance properties as configured on your account. + +An error will be raised if the provided instance does not exist in your account. + +## Example Usage + +```terraform +data "fptcloud_instance" "example" { + vpc_id = "your_vpc_id" + name = "your_instance_name" +} + +output "output-example" { + value = data.fptcloud_instance.example +} +``` + + +## Schema + +### Required + +- `vpc_id` (String) The vpc id of the instance + +### Optional + +- `flavor_id` (String) The flavor id of the instance +- `id` (String) The id of the instance +- `instance_group_id` (String) The instance group id of the instance +- `name` (String) The name of the instance +- `public_ip` (String) The public ip (floating ip) of the instance +- `security_group_ids` (List of String) The security group associated with the instance + +### Read-Only + +- `cpu_number` (Number) The cpu number of the instance +- `created_at` (String) The created at of the security group +- `guest_os` (String) The guest os of the instance +- `host_name` (String) The host name of the instance +- `memory_mb` (Number) The memory (mb) number of the instance +- `private_ip` (String) The private ip of the instance +- `status` (String) The status of the instance +- `storage_policy` (Number) The root storage policy of the instance +- `storage_size_gb` (Number) The root storage size of the instance +- `subnet_id` (String) The subnet id of the instance diff --git a/docs/data-sources/instance_group.md b/docs/data-sources/instance_group.md new file mode 100644 index 0000000..26331eb --- /dev/null +++ b/docs/data-sources/instance_group.md @@ -0,0 +1,107 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_instance_group Data Source - terraform-provider-fptcloud" +subcategory: "" +description: |- + Get information on an instance group for use in other resources. This data source provides all of the instance group properties as configured on your account. + An error will be raised if the provided instance group name does not exist in your account. +--- + +# fptcloud_instance_group (Data Source) + +Get information on an instance group for use in other resources. This data source provides all of the instance group properties as configured on your account. + +An error will be raised if the provided instance group name does not exist in your account. + +## Example Usage + +```terraform +data "fptcloud_instance_group" "example" { + vpc_id = "your_vpc_id" + filter { + key = "id" + values = ["your_instance_group_id"] + } + filter { + key = "name" + values = ["your_instance_group_name"] + } +} + +output "show_value" { + value = data.fptcloud_instance_group.example +} +``` + + +## Schema + +### Required + +- `vpc_id` (String) The vpc id of the instance group + +### Optional + +- `filter` (Block Set) One or more key/value pairs on which to filter results (see [below for nested schema](#nestedblock--filter)) +- `sort` (Block List) One or more key/direction pairs on which to sort results (see [below for nested schema](#nestedblock--sort)) + +### Read-Only + +- `id` (String) The ID of this resource. +- `instance_groups` (List of Object) (see [below for nested schema](#nestedatt--instance_groups)) + + +### Nested Schema for `filter` + +Required: + +- `key` (String) Filter instance_groups by this key. This may be one of `created_at`, `id`, `name`, `policy`, `vms`, `vpc_id`. +- `values` (List of String) Only retrieves `instance_groups` which keys has value that matches one of the values provided here + +Optional: + +- `all` (Boolean) Set to `true` to require that a field match all of the `values` instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of the `values` are present in the list or set. +- `match_by` (String) One of `exact` (default), `re`, or `substring`. For string-typed fields, specify `re` to match by using the `values` as regular expressions, or specify `substring` to match by treating the `values` as substrings to find within the string field. + + + +### Nested Schema for `sort` + +Required: + +- `key` (String) Sort instance_groups by this key. This may be one of `created_at`, `id`, `name`, `vpc_id`. + +Optional: + +- `direction` (String) The sort direction. This may be either `asc` or `desc`. + + + +### Nested Schema for `instance_groups` + +Read-Only: + +- `created_at` (String) +- `id` (String) +- `name` (String) +- `policy` (List of Object) (see [below for nested schema](#nestedobjatt--instance_groups--policy)) +- `vms` (List of Object) (see [below for nested schema](#nestedobjatt--instance_groups--vms)) +- `vpc_id` (String) + + +### Nested Schema for `instance_groups.policy` + +Read-Only: + +- `id` (String) +- `is_active` (Boolean) +- `name` (String) + + + +### Nested Schema for `instance_groups.vms` + +Read-Only: + +- `id` (String) +- `name` (String) diff --git a/docs/data-sources/instance_group_policy.md b/docs/data-sources/instance_group_policy.md new file mode 100644 index 0000000..61f1ef5 --- /dev/null +++ b/docs/data-sources/instance_group_policy.md @@ -0,0 +1,82 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_instance_group_policy Data Source - terraform-provider-fptcloud" +subcategory: "" +description: |- + Retrieves information about the instance group policy that fpt cloud supports, with the ability to filter the results. +--- + +# fptcloud_instance_group_policy (Data Source) + +Retrieves information about the instance group policy that fpt cloud supports, with the ability to filter the results. + +## Example Usage + +```terraform +data "fptcloud_instance_group_policy" "data" { + vpc_id = "your_vpc_id" + filter { + key = "id" + values = ["your_id"] + } + filter { + key = "name" + values = ["Soft Affinity", "Soft Anti Affinity"] + } +} + +output "show_value" { + value = data.fptcloud_instance_group_policy.data +} +``` + + +## Schema + +### Required + +- `vpc_id` (String) The vpc id of the instance group policy + +### Optional + +- `filter` (Block Set) One or more key/value pairs on which to filter results (see [below for nested schema](#nestedblock--filter)) +- `sort` (Block List) One or more key/direction pairs on which to sort results (see [below for nested schema](#nestedblock--sort)) + +### Read-Only + +- `id` (String) The ID of this resource. +- `instance_group_policies` (List of Object) (see [below for nested schema](#nestedatt--instance_group_policies)) + + +### Nested Schema for `filter` + +Required: + +- `key` (String) Filter instance_group_policies by this key. This may be one of `id`, `name`. +- `values` (List of String) Only retrieves `instance_group_policies` which keys has value that matches one of the values provided here + +Optional: + +- `all` (Boolean) Set to `true` to require that a field match all of the `values` instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of the `values` are present in the list or set. +- `match_by` (String) One of `exact` (default), `re`, or `substring`. For string-typed fields, specify `re` to match by using the `values` as regular expressions, or specify `substring` to match by treating the `values` as substrings to find within the string field. + + + +### Nested Schema for `sort` + +Required: + +- `key` (String) Sort instance_group_policies by this key. This may be one of `id`, `name`. + +Optional: + +- `direction` (String) The sort direction. This may be either `asc` or `desc`. + + + +### Nested Schema for `instance_group_policies` + +Read-Only: + +- `id` (String) +- `name` (String) diff --git a/docs/data-sources/ssh_key.md b/docs/data-sources/ssh_key.md index 1652a14..b0af0b1 100644 --- a/docs/data-sources/ssh_key.md +++ b/docs/data-sources/ssh_key.md @@ -31,3 +31,4 @@ data "fptcloud_ssh_key" "example" { ### Read-Only - `id` (String) The ID of this resource. +- `public_key` (String) The public key of the SSH key diff --git a/docs/index.md b/docs/index.md index c7bf1fd..f650865 100644 --- a/docs/index.md +++ b/docs/index.md @@ -34,6 +34,6 @@ provider "fptcloud" { ### Optional - `api_endpoint` (String) The URL to use -- `region` (String) The region to use +- `region` (String) The region to use (VN/HAN | VN/SGN) - `tenant_name` (String) The tenant name to use - `token` (String) This is the Fpt cloud API token. Alternatively, this can also be specified using `FPTCLOUD_TOKEN` environment variable. diff --git a/docs/resources/floating_ip.md b/docs/resources/floating_ip.md new file mode 100644 index 0000000..eebb2e5 --- /dev/null +++ b/docs/resources/floating_ip.md @@ -0,0 +1,82 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_floating_ip Resource - terraform-provider-fptcloud" +subcategory: "" +description: |- + Provides a FPT cloud instance group which can be attached to an instance in order to provide expanded floating ip. +--- + +# fptcloud_floating_ip (Resource) + +Provides a FPT cloud instance group which can be attached to an instance in order to provide expanded floating ip. + +## Example Usage + +```terraform +data "fptcloud_floating_ip_rule_ip_address" "example_ip_address" { + vpc_id = "your_vpc_id" + filter { + key = "id" + values = ["your_ip_address_id"] + } +} + +data "fptcloud_floating_ip_rule_instance" "example_instance" { + vpc_id = "your_vpc_id" + filter { + key = "id" + values = ["your_instance_id"] + } +} + +resource "fptcloud_floating_ip" "example" { + vpc_id = "your_vpc_id" + floating_ip_id = "new" +} + +resource "fptcloud_floating_ip" "example" { + vpc_id = "your_vpc_id" + floating_ip_id = "new" + instance_id = fptcloud_floating_ip_rule_instance.example_instance.id + # This is optional to ensure the floating ip is created before the rule + depends_on = [fptcloud_floating_ip_rule_instance.example_instance] +} + +resource "fptcloud_floating_ip" "example" { + vpc_id = "your_vpc_id" + floating_ip_id = fptcloud_floating_ip_rule_ip_address.example_ip_address.id + instance_id = fptcloud_floating_ip_rule_instance.example_instance.id + # This is optional to ensure the floating ip is created before the rule + depends_on = [fptcloud_floating_ip_rule_ip_address.example_ip_address, fptcloud_floating_ip_rule_instance.example_instance] +} + +resource "fptcloud_floating_ip" "example" { + vpc_id = "your_vpc_id" + floating_ip_id = fptcloud_floating_ip_rule_ip_address.example_ip_address.id + instance_id = fptcloud_floating_ip_rule_instance.example_instance.id + floating_ip_port = 1 + instance_port = 1 + # This is optional to ensure the floating ip is created before the rule + depends_on = [fptcloud_floating_ip_rule_ip_address.example_ip_address, fptcloud_floating_ip_rule_instance.example_instance] +} +``` + + +## Schema + +### Required + +- `floating_ip_id` (String) The id of the ip address +- `vpc_id` (String) The vpc id of the floating ip + +### Optional + +- `floating_ip_port` (Number) The port of the ip address +- `instance_id` (String) The id of the instance +- `instance_port` (Number) The port of the instance + +### Read-Only + +- `created_at` (String) +- `id` (String) The ID of this resource. +- `ip_address` (String) diff --git a/docs/resources/instance.md b/docs/resources/instance.md new file mode 100644 index 0000000..918812c --- /dev/null +++ b/docs/resources/instance.md @@ -0,0 +1,57 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_instance Resource - terraform-provider-fptcloud" +subcategory: "" +description: |- + Provides a instance resource. This can be used to create, modify, and delete instances. +--- + +# fptcloud_instance (Resource) + +Provides a instance resource. This can be used to create, modify, and delete instances. + +## Example Usage + +```terraform +resource "fptcloud_instance" "example" { + name = "example" + vpc_id = "your_vpc_id" + ssh_key = "your_public_key" + image_id = "your_image_id" + flavor_id = "your_flavor_id" + public_ip = "your_ip_public" + subnet_id = "f25b15f5-9098-429e-887d-1c9562b648ae" + storage_size_gb = 50 + storage_policy_id = "your_storage_policy_id" + security_group_ids = [] + status = "POWERED_ON" +} +``` + + +## Schema + +### Required + +- `image_id` (String) The image id of the instance +- `name` (String) The name of the instance +- `status` (String) The status of the instance (`POWERED_ON` or `POWERED_OFF`) +- `storage_policy_id` (String) The root storage policy of the instance +- `storage_size_gb` (Number) The root storage size of the instance +- `subnet_id` (String) The subnet id of the instance +- `vpc_id` (String) The vpc id of the instance + +### Optional + +- `flavor_id` (String) The flavor id of the instance +- `instance_group_id` (String) The instance group id of the instance +- `password` (String) The password of the instance +- `private_ip` (String) The private ip of the instance. +- `public_ip` (String) The public ip (floating ip) of the instance. Fill `new` to allocate new from the pool. +- `security_group_ids` (List of String) The security group associated with the instance +- `ssh_key` (String) The ssh key of the instance + +### Read-Only + +- `created_at` (String) The created at of the security group +- `id` (String) The id of the instance diff --git a/docs/resources/instance_group.md b/docs/resources/instance_group.md new file mode 100644 index 0000000..3c6dbf0 --- /dev/null +++ b/docs/resources/instance_group.md @@ -0,0 +1,43 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_instance_group Resource - terraform-provider-fptcloud" +subcategory: "" +description: |- + Provides a FPT cloud instance group that can be attached to an instance in order to provide an expanded instance group. +--- + +# fptcloud_instance_group (Resource) + +Provides a FPT cloud instance group that can be attached to an instance in order to provide an expanded instance group. + +## Example Usage + +```terraform +resource "fptcloud_instance_group" "example" { + vpc_id = "your_vpc_id" + name = "your_instance_group_name" + policy_id = "your_policy_id" + vm_ids = "your_instance_id" +} +``` + + +## Schema + +### Required + +- `name` (String) The name of the instance group +- `policy_id` (String) The policy of the instance group +- `vpc_id` (String) The vpc id of the instance group + +### Optional + +- `vm_ids` (List of String) The list of instances in the instance group + +### Read-Only + +- `created_at` (String) +- `id` (String) The id of the instance group +- `policy` (String) +- `policy_name` (String) +- `vms` (String) From b8876de322112c57f46f67078c4b654dac63229b Mon Sep 17 00:00:00 2001 From: "duc.do" Date: Fri, 9 Aug 2024 14:23:53 +0700 Subject: [PATCH 2/2] feat: update go release --- .goreleaser.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 9bb0aa7..2698c02 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,6 @@ # Visit https://goreleaser.com for documentation on how to customize this # behavior. +version: 2 before: hooks: # this is just an example and not a requirement for provider building/publishing @@ -7,7 +8,7 @@ before: builds: - env: # goreleaser does not work with CGO, it could also complicate - # usage by users in CI/CD systems like Terraform Cloud where + # usage by users in CI/CD systems like HCP Terraform where # they are unable to install libraries. - CGO_ENABLED=0 mod_timestamp: '{{ .CommitTimestamp }}' @@ -41,7 +42,7 @@ checksum: signs: - artifacts: checksum args: - # if you are using this in a GitHub action or some other automated pipeline, you + # if you are using this in a GitHub action or some other automated pipeline, you # need to pass the batch flag to indicate its not interactive. - "--batch" - "--local-user" @@ -57,4 +58,4 @@ release: # If you want to manually examine the release before its live, uncomment this line: # draft: true changelog: - skip: true + disable: true \ No newline at end of file