Skip to content

feat: add inline hook and event hook resources - #2887

Open
pranav-okta wants to merge 4 commits into
masterfrom
new-inline-hook-event-hook-resources
Open

feat: add inline hook and event hook resources#2887
pranav-okta wants to merge 4 commits into
masterfrom
new-inline-hook-event-hook-resources

Conversation

@pranav-okta

@pranav-okta pranav-okta commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

JIRA: https://oktainc.atlassian.net/browse/OKTA-1218464

  • Migrates okta_inline_hook and okta_event_hook from SDKv2 to Terraform Plugin Framework using generated implementations. Removes the old SDKv2 registrations, adds generated resource files and acceptance tests for both hooks, updates example TF fixtures to match the new nested block schema, updates docs to reflect the new schema, and adds VCR cassettes for the new acceptance tests.

@github-actions
github-actions Bot requested a review from dhiwakar-okta July 11, 2026 09:37
@pranav-okta pranav-okta self-assigned this Jul 13, 2026
id := state.ID.ValueString()

client := r.Config.OktaIDaaSClient.OktaSDKClientV6()
httpResp, err := client.EventHookAPI.DeleteEventHook(ctx, id).Execute()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does deletion of the event hook work without deactivation ?

"key": header.Key,
"value": header.Value,
client := r.Config.OktaIDaaSClient.OktaSDKClientV6()
httpResp, err := client.InlineHookAPI.DeleteInlineHook(ctx, id).Execute()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does deletion of the event hook work without deactivation ?

},
},
Blocks: map[string]schema.Block{
"channel": schema.SingleNestedBlock{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that the type of this field has changed from
Type: schema.TypeMap
to
schema.SingleNestedBlock
Did this bring up any issues when you tested migrating the resource ?

Description: "Version of the inline hook type.",
Optional: true,
},
"channel_json": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about channel_json ? We can't migrate unless we support this existing field, even if it isn't part of the request body.

Description: "Display name for the event hook",
Required: true,
},
"status": schema.StringAttribute{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this we cannot activate or deactivate the event hook by updating the value of status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants