-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--------- Signed-off-by: FingerLeader <[email protected]> Co-authored-by: zhangyangyu <[email protected]>
- Loading branch information
1 parent
44805ad
commit d398e32
Showing
34 changed files
with
959 additions
and
414 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
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
default: testacc | ||
|
||
# Run acceptance tests | ||
.PHONY: testacc | ||
testacc: | ||
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m | ||
|
||
.PHONY: generate-mocks | ||
generate-mocks: ## Generate mock objects | ||
@echo "==> Generating mock objects" | ||
go install github.com/vektra/mockery/[email protected] | ||
# mockery --name TiDBCloudClient --recursive --output=mock --outpkg mock --filename api_client.go | ||
mockery --name TiDBCloudDedicatedClient --recursive --output=mock --outpkg mock --filename dedicated_api_client.go |
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,39 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "tidbcloud_dedicated_cloud_providers Data Source - terraform-provider-tidbcloud" | ||
subcategory: "" | ||
description: |- | ||
dedicated cloud providers data source | ||
--- | ||
|
||
# tidbcloud_dedicated_cloud_providers (Data Source) | ||
|
||
dedicated cloud providers data source | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "project_id" { | ||
type = string | ||
nullable = true | ||
} | ||
data "tidbcloud_dedicated_cloud_providers" "example" { | ||
project_id = var.project_id | ||
} | ||
output "output" { | ||
value = data.tidbcloud_dedicated_cloud_providers.example | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `project_id` (String) The ID of the project. If not set, it will return the cloud providers that can be selected under the default project. | ||
|
||
### Read-Only | ||
|
||
- `cloud_providers` (List of String) The cloud providers. |
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,40 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "tidbcloud_dedicated_region Data Source - terraform-provider-tidbcloud" | ||
subcategory: "" | ||
description: |- | ||
dedicated region data source | ||
--- | ||
|
||
# tidbcloud_dedicated_region (Data Source) | ||
|
||
dedicated region data source | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "region_id" { | ||
type = string | ||
nullable = false | ||
} | ||
data "tidbcloud_dedicated_region" "example" { | ||
region_id = var.region_id | ||
} | ||
output "output" { | ||
value = data.tidbcloud_dedicated_region.example | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `region_id` (String) The ID of the region. | ||
|
||
### Read-Only | ||
|
||
- `cloud_provider` (String) The cloud provider of the region. | ||
- `display_name` (String) The display name of the region. |
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,55 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "tidbcloud_dedicated_regions Data Source - terraform-provider-tidbcloud" | ||
subcategory: "" | ||
description: |- | ||
dedicated regions data source | ||
--- | ||
|
||
# tidbcloud_dedicated_regions (Data Source) | ||
|
||
dedicated regions data source | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "project_id" { | ||
type = string | ||
nullable = true | ||
} | ||
variable "cloud_provider" { | ||
type = string | ||
nullable = true | ||
} | ||
data "tidbcloud_dedicated_regions" "example" { | ||
project_id = var.project_id | ||
cloud_provider = var.cloud_provider | ||
} | ||
output "output" { | ||
value = data.tidbcloud_dedicated_regions.example | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `cloud_provider` (String) The cloud provider of the regions. If not set, it will return the regions that can be selected from all cloud providers. | ||
- `project_id` (String) The ID of the project. If not set, it will return the regions that can be selected under the default project. | ||
|
||
### Read-Only | ||
|
||
- `regions` (Attributes List) The regions. (see [below for nested schema](#nestedatt--regions)) | ||
|
||
<a id="nestedatt--regions"></a> | ||
### Nested Schema for `regions` | ||
|
||
Read-Only: | ||
|
||
- `cloud_provider` (String) The cloud provider of the region. | ||
- `display_name` (String) The display name of the region. | ||
- `region_id` (String) The ID of the region. |
12 changes: 12 additions & 0 deletions
12
examples/data-sources/tidbcloud_dedicated_cloud_providers/data-source.tf
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,12 @@ | ||
variable "project_id" { | ||
type = string | ||
nullable = true | ||
} | ||
|
||
data "tidbcloud_dedicated_cloud_providers" "example" { | ||
project_id = var.project_id | ||
} | ||
|
||
output "output" { | ||
value = data.tidbcloud_dedicated_cloud_providers.example | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/data-sources/tidbcloud_dedicated_region/data-source.tf
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,12 @@ | ||
variable "region_id" { | ||
type = string | ||
nullable = false | ||
} | ||
|
||
data "tidbcloud_dedicated_region" "example" { | ||
region_id = var.region_id | ||
} | ||
|
||
output "output" { | ||
value = data.tidbcloud_dedicated_region.example | ||
} |
18 changes: 18 additions & 0 deletions
18
examples/data-sources/tidbcloud_dedicated_regions/data-source.tf
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,18 @@ | ||
variable "project_id" { | ||
type = string | ||
nullable = true | ||
} | ||
|
||
variable "cloud_provider" { | ||
type = string | ||
nullable = true | ||
} | ||
|
||
data "tidbcloud_dedicated_regions" "example" { | ||
project_id = var.project_id | ||
cloud_provider = var.cloud_provider | ||
} | ||
|
||
output "output" { | ||
value = data.tidbcloud_dedicated_regions.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
Oops, something went wrong.