Skip to content

Commit

Permalink
Fix links to docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Feb 27, 2023
1 parent c9ae4a8 commit 74b9e11
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ The Authress terraform provider to automatically configure Authress from Terrafo
[discuss]: https://discuss.hashicorp.com/c/terraform-providers/31

[terraform-badge]: https://img.shields.io/badge/install-terraform--authress-blue.svg
[terraform-link]: https://registry.terraform.io/providers/hashicorp/authress/latest/docs
[terraform-link]: https://registry.terraform.io/providers/authress/authress/latest/docs

## Installation

Install the `Authress` terraform provider, and review the documentation @ [Authress Terraform Documentation](https://registry.terraform.io/providers/hashicorp/authress/latest/docs)
Install the `Authress` terraform provider, and review the documentation @ [Authress Terraform Documentation](https://registry.terraform.io/providers/authress/authress/latest/docs)

```hcl
terraform {
Expand Down
8 changes: 5 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ required_providers {
authress = {
source = "authress/authress"
version = "~> 1.0"
# Authress custom domain configuration: https://authress.io/app/#/settings?focus=domain
custom_domain = "https://login.example.com"
}
}
provider "authress" {
# Authress custom domain configuration: https://authress.io/app/#/settings?focus=domain
custom_domain = "https://login.example.com"
}
resource "authress_role" "document_admin" {
role_id = "documents_admin"
name = "Documents Administrator"
Expand Down
4 changes: 4 additions & 0 deletions src/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package authress
import (
"context"
"os"
"strings"

"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/path"
Expand Down Expand Up @@ -102,6 +103,9 @@ func (p *authressProvider) Configure(ctx context.Context, req provider.Configure

if !config.CustomDomain.IsNull() {
customDomain = config.CustomDomain.ValueString()
if !strings.HasPrefix(customDomain, "http") {
customDomain = "https://" + customDomain
}
}

if !config.AccessKey.IsNull() {
Expand Down

0 comments on commit 74b9e11

Please sign in to comment.