-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'github/feat/fke' into dedicated-fke
- Loading branch information
Showing
11 changed files
with
1,340 additions
and
1 deletion.
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
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,26 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "fptcloud_edge_gateway Data Source - terraform-provider-fptcloud" | ||
subcategory: "" | ||
description: |- | ||
Retrieves information about FPT Cloud edge gateway | ||
--- | ||
|
||
# fptcloud_edge_gateway (Data Source) | ||
|
||
Retrieves information about FPT Cloud edge gateway | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Name of the compute edge_gateway | ||
- `vpc_id` (String) VPC id | ||
|
||
### Read-Only | ||
|
||
- `edge_gateway_id` (String) Edge gateway id | ||
- `id` (String) Identifier of the edge_gateway |
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,49 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "fptcloud_database Resource - terraform-provider-fptcloud" | ||
subcategory: "" | ||
description: |- | ||
Provides a Fpt database cluster which can be used to store data. | ||
--- | ||
|
||
# fptcloud_database (Resource) | ||
|
||
Provides a Fpt database cluster which can be used to store data. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `admin_password` (String) The admin password of the database cluster. | ||
- `cluster_name` (String) The name of the database cluster. | ||
- `data_disk_size` (Number) The size of the data disk in each node of the database cluster. | ||
- `database_name` (String) The name of the database in the database cluster. | ||
- `domain_name` (String) The domain name of the database cluster. | ||
- `edge_id` (String) The edge Id of the database cluster. | ||
- `edition` (String) The edition of the database cluster. | ||
- `flavor` (String) The flavor of the database cluster. | ||
- `is_cluster` (String) The cluster status of the database cluster. | ||
- `is_ops` (String) Whether the database is OpenStack or VMware | ||
- `is_public` (String) Whether the database is public or not. | ||
- `master_count` (Number) The number of master nodes in the database cluster. | ||
- `network_id` (String) The network Id of the database cluster. | ||
- `node_core` (Number) The number of cores in each node of the database cluster. | ||
- `node_cpu` (Number) The number of CPUs in each node of the database cluster. | ||
- `node_ram` (Number) The amount of RAM in each node of the database cluster. | ||
- `number_of_node` (Number) The number of nodes in the database cluster. | ||
- `storage_profile` (String) The storage profile of the database cluster. | ||
- `type_config` (String) The type of configuration of the database cluster (short-config or custom-config). | ||
- `type_db` (String) The type of database of the database cluster | ||
- `vdc_name` (String) The VDC name of the database cluster. | ||
- `version` (String) The version of the database cluster. | ||
- `vhost_name` (String) The name of the RabbitMQ database. | ||
- `vm_network` (String) The VM network of the database cluster. | ||
- `vpc_id` (String) The VPC Id of the database cluster. | ||
- `worker_count` (Number) The number of worker nodes in the database cluster. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The Id of the database cluster. |
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,21 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "fptcloud_database_status Resource - terraform-provider-fptcloud" | ||
subcategory: "" | ||
description: |- | ||
Provides a Fpt database cluster status to temporarily stop or start a database. | ||
--- | ||
|
||
# fptcloud_database_status (Resource) | ||
|
||
Provides a Fpt database cluster status to temporarily stop or start a database. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The Id of the database cluster. | ||
- `status` (String) The status of the database cluster, must be 'running' or 'stopped'. |
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,7 @@ | ||
data "fptcloud_edge_gateway" "example" { | ||
vpc_id = "your_vpc_id" | ||
name = "your_edge_gateway_name" | ||
} | ||
output "show_value" { | ||
value = data.fptcloud_edge_gateway.example | ||
} |
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,29 @@ | ||
package fptcloud_database | ||
|
||
import ( | ||
commons "terraform-provider-fptcloud/commons" | ||
) | ||
|
||
type databaseApiClient struct { | ||
*commons.Client | ||
edgeClient *commons.Client | ||
} | ||
|
||
func newDatabaseApiClient(c *commons.Client) (*databaseApiClient, error) { | ||
serviceToken := "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzb21lIjoicGF5bG9hZCJ9.Joh1R2dYzkRvDkqv3sygm5YyK8Gi4ShZqbhK2gxcs2U" | ||
edgeClient, err := commons.NewClientWithURL( | ||
serviceToken, | ||
c.BaseURL.String(), | ||
c.Region, | ||
c.TenantName, | ||
) | ||
|
||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return &databaseApiClient{ | ||
Client: edgeClient, | ||
edgeClient: edgeClient, | ||
}, nil | ||
} |
Oops, something went wrong.