Update README.md to separate provider conf and local dev
All checks were successful
test / test (push) Successful in 32s
All checks were successful
test / test (push) Successful in 32s
This commit is contained in:
parent
c8104c0f1d
commit
da1f4eecdb
1 changed files with 10 additions and 12 deletions
22
README.md
22
README.md
|
|
@ -50,17 +50,11 @@ mkdir -p ~/.terraform.d/plugins/registry.terraform.io/DevFW-CICD/edge-connect/1.
|
||||||
cp terraform-provider-edge-connect ~/.terraform.d/plugins/registry.terraform.io/DevFW-CICD/edge-connect/1.0.0/darwin_arm64/
|
cp terraform-provider-edge-connect ~/.terraform.d/plugins/registry.terraform.io/DevFW-CICD/edge-connect/1.0.0/darwin_arm64/
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: Adjust the path based on your OS and architecture (e.g., `linux_amd64`, `darwin_amd64`, etc.)
|
> Note: Adjust the path based on your OS and architecture (e.g., `linux_amd64`, `darwin_amd64`, etc.)
|
||||||
|
|
||||||
## Usage
|
4. Generate the binary by running `go install .` from the repository root. This installs the provider binary to `$HOME/go/bin` and means that `terraform init` is not necessary.
|
||||||
|
|
||||||
### Provider Configuration
|
5. You will also need a `~/.terraformrc` file with the following contents. `<home>` should refer to your `$HOME` directory.
|
||||||
|
|
||||||
As the provider is currently not officially registered for public download, terraform must be configured to use a locally built version.
|
|
||||||
|
|
||||||
To generate the binary run `go install .` from the repository root. This installs the provider binary to `$HOME/go/bin` and means that `terraform init` is not necessary.
|
|
||||||
|
|
||||||
You will also need a `~/.terraformrc` file with the following contents. `<home>` should refer to your `$HOME` directory.
|
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
provider_installation {
|
provider_installation {
|
||||||
|
|
@ -76,7 +70,11 @@ provider_installation {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then reference the local provider in your `.tf` files as follows:
|
## Usage
|
||||||
|
|
||||||
|
### Provider Configuration
|
||||||
|
|
||||||
|
The provider must be configured with credentials and a URL. This can be done with a token in your code:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
provider "edge-connect" {
|
provider "edge-connect" {
|
||||||
|
|
@ -85,7 +83,7 @@ provider "edge-connect" {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Or using basic authentication:
|
Or with basic authentication:
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
provider "edge-connect" {
|
provider "edge-connect" {
|
||||||
|
|
@ -95,7 +93,7 @@ provider "edge-connect" {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration can also be provided via environment variables:
|
Or without code changes, via environment variables:
|
||||||
- `EDGE_CONNECT_BASE_URL`
|
- `EDGE_CONNECT_BASE_URL`
|
||||||
- `EDGE_CONNECT_TOKEN`
|
- `EDGE_CONNECT_TOKEN`
|
||||||
- `EDGE_CONNECT_USERNAME`
|
- `EDGE_CONNECT_USERNAME`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue