-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert static structs to pointers and force return results to be cop…
…ies.
- Loading branch information
Showing
7 changed files
with
68 additions
and
70 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 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,44 @@ | ||
# Try out the development example | ||
### Setup | ||
|
||
Update your `~/.terraformrc` with the following | ||
|
||
```hcl | ||
provider_installation { | ||
dev_overrides { | ||
"hashicorp.com/authress/authress" = "~/go/bin" | ||
} | ||
# For all other providers, install them directly from their origin provider | ||
# registries as normal. If you omit this, Terraform will _only_ use | ||
# the dev_overrides block, and so no other providers will be available. | ||
direct {} | ||
} | ||
``` | ||
|
||
Test the provider out locally to validate it works | ||
```sh | ||
go run main.go | ||
``` | ||
|
||
Run the following command to build the provider | ||
|
||
```shell | ||
go build -o terraform-provider-authress && cp terraform-provider-authress ~/go/bin | ||
terraform init | ||
``` | ||
|
||
## Test sample configuration | ||
|
||
First, build and install the provider. | ||
|
||
```shell | ||
make install | ||
``` | ||
|
||
Then, run the following command to initialize the workspace and apply the sample configuration. | ||
|
||
```shell | ||
terraform init && terraform apply | ||
``` |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"terraform-provider-authress/src" | ||
"context" | ||
authress "terraform-provider-authress/src" | ||
|
||
"github.com/hashicorp/terraform-plugin-framework/providerserver" | ||
"github.com/hashicorp/terraform-plugin-framework/providerserver" | ||
) | ||
|
||
func main() { | ||
providerserver.Serve(context.Background(), authress.New, providerserver.ServeOpts{ | ||
Address: "localhost.com/authress/authress", | ||
Address: "hashicorp.com/authress/authress", | ||
}) | ||
} |
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