Skip to content

Commit

Permalink
Merge pull request #1 from fpt-corp/feature/update_go_release
Browse files Browse the repository at this point in the history
feat: update go release
  • Loading branch information
ducdm49 authored Aug 9, 2024
2 parents a8cb1bc + b8876de commit 2b3f869
Show file tree
Hide file tree
Showing 14 changed files with 728 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ go.work

# .log files
*.log
*.log.*
*.log.*

.bin/*
.bin
.bin/
7 changes: 4 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# 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
- go mod tidy
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 }}'
Expand Down Expand Up @@ -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"
Expand All @@ -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
26 changes: 23 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
89 changes: 89 additions & 0 deletions docs/data-sources/floating_ip.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

<a id="nestedblock--filter"></a>
### 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.


<a id="nestedblock--sort"></a>
### 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`.


<a id="nestedatt--floating_ips"></a>
### Nested Schema for `floating_ips`

Read-Only:

- `created_at` (String)
- `id` (String)
- `ip_address` (String)
- `nat_type` (String)
- `status` (String)
- `vpc_id` (String)
92 changes: 92 additions & 0 deletions docs/data-sources/floating_ip_rule_instance.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

<a id="nestedblock--filter"></a>
### 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.


<a id="nestedblock--sort"></a>
### 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`.


<a id="nestedatt--floating_ip_rule_instance_att"></a>
### Nested Schema for `floating_ip_rule_instance_att`

Read-Only:

- `id` (String)
- `ip_address` (String)
- `name` (String)
- `type` (String)
- `vpc_id` (String)
86 changes: 86 additions & 0 deletions docs/data-sources/floating_ip_rule_ip_address.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

<a id="nestedblock--filter"></a>
### 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.


<a id="nestedblock--sort"></a>
### 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`.


<a id="nestedatt--floating_ip_rule_ip_address_att"></a>
### Nested Schema for `floating_ip_rule_ip_address_att`

Read-Only:

- `id` (String)
- `name` (String)
- `vpc_id` (String)
56 changes: 56 additions & 0 deletions docs/data-sources/instance.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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
Loading

0 comments on commit 2b3f869

Please sign in to comment.