Skip to content

Commit 1b3fba4

Browse files
Update README.md
Optimized README
1 parent 4f20173 commit 1b3fba4

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

README.md

+44-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,44 @@
1-
# terraform-provider-oceanbase
2-
基于多云 api 实现的 OceanBase 的 terraform-provider, 可以让用户使用 terraform 来管理多云上的 OceanBase 资源。
1+
# Terraform Provider for OceanBase
2+
This provider allows user to manage OceanBase resources on cloud environment using terraform, it's based on OceanBase's [multi-cloud platform](https://console-cn.oceanbase.com) APIs.
3+
4+
## Requirements
5+
Go 1.22 (to build the provider)
6+
7+
## Building The Provider
8+
Run the following command to build the provider
9+
```
10+
make build
11+
```
12+
## Using the provider
13+
First, configure the `.terraformrc` file under user's home directory, make sure to the real path where the binary located.
14+
```
15+
provider_installation {
16+
17+
dev_overrides {
18+
"oceanbase.github.io/oceanbase/oceanbase" = "~/terraform-provider-oceanbase/bin"
19+
}
20+
21+
# For all other providers, install them directly from their origin provider
22+
# registries as normal. If you omit this, Terraform will _only_ use
23+
# the dev_overrides block, and so no other providers will be available.
24+
direct {}
25+
}
26+
```
27+
28+
You can refer to the following config to use the provider.
29+
```
30+
terraform {
31+
required_providers {
32+
oceanbase = {
33+
source = "oceanbase.github.io/oceanbase/oceanbase"
34+
}
35+
}
36+
}
37+
38+
provider "oceanbase" {
39+
access_key = "access_key"
40+
secret_key = "secret_key"
41+
site = "CHINA" # CHINA or GLOBAL
42+
}
43+
```
44+
For OceanBase related resources configurations, please refer to the files under example directory.

0 commit comments

Comments
 (0)