diff --git a/.gitignore b/.gitignore index 793924c..3fde553 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,6 @@ website/vendor # Keep windows files with windows line endings *.winfile eol=crlf -/examples/dev \ No newline at end of file +/examples/dev + +*.lock.hcl \ No newline at end of file diff --git a/docs/resources/source_verification.md b/docs/resources/source_verification.md index 67ea3ce..17fd727 100644 --- a/docs/resources/source_verification.md +++ b/docs/resources/source_verification.md @@ -122,8 +122,8 @@ Required: Required: -- `name` (String) - `password` (String, Sensitive) +- `username` (String) diff --git a/examples/full/main.tf b/examples/full/main.tf index f6dd715..bf001c5 100644 --- a/examples/full/main.tf +++ b/examples/full/main.tf @@ -9,8 +9,7 @@ variable "HEADER_FILTER_VALUES" { terraform { required_providers { hookdeck = { - source = "hookdeck/hookdeck" - version = "~> 0.3.1" + source = "hookdeck/hookdeck" } } } @@ -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" diff --git a/internal/provider/sourceverification/verification_basicauth.go b/internal/provider/sourceverification/verification_basicauth.go index 5e1b557..a3d477a 100644 --- a/internal/provider/sourceverification/verification_basicauth.go +++ b/internal/provider/sourceverification/verification_basicauth.go @@ -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, + }, }, } }