You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+83-44Lines changed: 83 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,7 @@
1
1
---
2
-
# generated by https://github.com/hashicorp/terraform-plugin-docs
3
2
page_title: "ory Provider"
4
3
description: |-
5
-
The Ory provider enables Terraform to manage Ory Network https://www.ory.sh/ resources.
6
-
Authentication
7
-
Ory Network uses two types of API keys:
8
-
Workspace API Key (ory_wak_...): For organizations, projects, and workspace managementProject API Key (ory_pat_...): For identities, OAuth2 clients, and sessions
9
-
Configure via environment variables or provider block:
10
-
11
-
provider "ory" {
12
-
workspace_api_key = var.ory_workspace_key # or ORY_WORKSPACE_API_KEY env var
13
-
project_api_key = var.ory_project_key # or ORY_PROJECT_API_KEY env var
14
-
project_id = var.ory_project_id # or ORY_PROJECT_ID env var
15
-
project_slug = var.ory_project_slug # or ORY_PROJECT_SLUG env var
16
-
}
4
+
The Ory provider enables Terraform to manage Ory Network resources.
17
5
---
18
6
19
7
# ory Provider
@@ -24,24 +12,44 @@ The Ory provider enables Terraform to manage [Ory Network](https://www.ory.sh/)
24
12
25
13
Ory Network uses two types of API keys:
26
14
27
-
1.**Workspace API Key** (`ory_wak_...`): For organizations, projects, and workspace management
28
-
2.**Project API Key** (`ory_pat_...`): For identities, OAuth2 clients, and sessions
~> **Note:**`auth_method` is only used for `timing = "after"` webhooks. For `timing = "before"` hooks, the webhook runs before any authentication method is invoked.
77
+
78
+
## HTTP Method
79
+
80
+
The `method` attribute specifies the HTTP method used when calling the webhook:
81
+
82
+
| Value | Description |
83
+
|-------|-------------|
84
+
|`POST`| HTTP POST request (default) |
85
+
|`GET`| HTTP GET request |
86
+
|`PUT`| HTTP PUT request |
87
+
|`PATCH`| HTTP PATCH request |
88
+
|`DELETE`| HTTP DELETE request |
89
+
90
+
## Import
91
+
92
+
Actions must be imported with the HTTP method included in the import ID.
5.**method**: The HTTP method (POST, GET, PUT, PATCH, DELETE)
127
+
6.**url**: The exact webhook URL - must match exactly including protocol and trailing slashes
128
+
129
+
### Troubleshooting Import Errors
130
+
131
+
If you see "Cannot import non-existent remote object", the import will show a warning listing webhooks found at that location. This helps you find the correct URL, method, and auth_method.
132
+
133
+
Common issues:
134
+
-**URL mismatch**: URLs must match exactly, including `https://` and any trailing `/`
135
+
-**Wrong method**: Check the HTTP method configured for the webhook (POST, PATCH, etc.)
136
+
-**Wrong auth_method**: Check which authentication method the webhook is configured for
137
+
-**Wrong timing**: Check if the webhook is a pre-hook (before) or post-hook (after)
-`auth_method` (String) Authentication method to hook into (password, oidc, code, webauthn, passkey, totp, lookup_secret). Required for 'after' timing.
150
+
-`auth_method` (String) Authentication method that triggers the webhook. In the Ory Console UI, this is the "Method" selector. Valid values: `password` (default), `oidc` (social login), `code` (magic link/OTP), `webauthn`, `passkey`, `totp`, `lookup_secret`. Only used for `timing = "after"` webhooks.
73
151
-`body` (String) Jsonnet template for the request body.
74
152
-`can_interrupt` (Boolean) Allow webhook to interrupt/block the flow (default: false).
**Note:** The "_invalid" templates are sent when a code has expired or is incorrect. The non-code variants (recovery_valid, verification_valid) are for legacy link-based flows.
-`body_html` (String) HTML body template (Go template syntax).
114
138
-`body_plaintext` (String) Plaintext body template (Go template syntax).
115
-
-`template_type` (String) Template type (e.g., recovery_code_valid, verification_valid).
139
+
-`template_type` (String) The email template type. See the Template Types table above for valid values and their UI equivalents. Common values: `registration_code_valid`, `login_code_valid`, `verification_code_valid`, `recovery_code_valid`.
0 commit comments