Skip to content

Commit

Permalink
fix:basic auth user -> username attribute change (#61)
Browse files Browse the repository at this point in the history
* fix:basic auth user -> username attribute change

* chore: go generate

* chore: order schema attributres alphabetically

* chore(examples): add source auth to full example

* chore: go generate
  • Loading branch information
leggetter committed May 10, 2024
1 parent f02e9a8 commit 5de0b5c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ website/vendor
# Keep windows files with windows line endings
*.winfile eol=crlf

/examples/dev
/examples/dev

*.lock.hcl
2 changes: 1 addition & 1 deletion docs/resources/source_verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ Required:

Required:

- `name` (String)
- `password` (String, Sensitive)
- `username` (String)


<a id="nestedatt--verification--bondsmith"></a>
Expand Down
13 changes: 11 additions & 2 deletions examples/full/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ variable "HEADER_FILTER_VALUES" {
terraform {
required_providers {
hookdeck = {
source = "hookdeck/hookdeck"
version = "~> 0.3.1"
source = "hookdeck/hookdeck"
}
}
}
Expand All @@ -23,6 +22,16 @@ resource "hookdeck_source" "my_source" {
name = "my_source"
}

resource "hookdeck_source_verification" "my_authenticated_source" {
source_id = hookdeck_source.my_source.id
verification = {
basic_auth = {
username = "example-username"
password = "example-password"
}
}
}

resource "hookdeck_destination" "my_destination" {
name = "my_destination"
url = "https://mock.hookdeck.com"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ func basicAuthConfigSchema() schema.SingleNestedAttribute {
return schema.SingleNestedAttribute{
Optional: true,
Attributes: map[string]schema.Attribute{
"name": schema.StringAttribute{
Required: true,
},
"password": schema.StringAttribute{
Required: true,
Sensitive: true,
},
"username": schema.StringAttribute{
Required: true,
},
},
}
}
Expand Down

0 comments on commit 5de0b5c

Please sign in to comment.