Skip to content

Expose message_channel_ids on opal_resource via overlay entity mapping - #203

Draft
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-197-resource-message-channels
Draft

Expose message_channel_ids on opal_resource via overlay entity mapping#203
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-197-resource-message-channels

Conversation

@claude

@claude claude Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Requested via Slack thread

Linear: COR-5621

Description of the change

Addresses #197.

Before: opal_resource has no message_channel_ids attribute, even though the API supports GET/PUT /resources/{resource_id}/message-channels — so audit-message channels on resources can't be managed in Terraform (only read via the opal_resource_message_channel_list data source).

After: opal_resource gains a settable message_channel_ids attribute (plus computed message_channels), matching what opal_group already offers.

Approach: overlay-only entity-mapping change in terraform_overlay.yaml, mirroring the existing group pattern — the GET is merged into the resource entity as Resource#read#2 (response allOf-wrapped with x-speakeasy-wrapped-attribute: message_channels and x-speakeasy-param-suppress-computed-diff), and the PUT becomes Resource#create#4 + Resource#update#3 with the 200 response ignored. The standalone opal_resource_message_channel_list data source mapping is kept alongside via a multi-entity operation list (same precedent as Group#delete + AccessRule#delete).

How / notes for maintainers: internal/sdk/, openapi.yaml, and docs/ are Speakeasy-generated, so this PR intentionally touches only terraform_overlay.yaml — please run the sdk_generation workflow on this branch to regenerate before un-drafting (same flow as #200). On regen, please double-check: (1) opal_resource is widely used, so state-upgrader/import impact of the new attributes should be verified (internal/stateupgraders); (2) the new x-speakeasy-name-override: id on the GET parameter may rename the opal_resource_message_channel_list data source's resource_id argument to id (as happened for opal_resource_visibility) — if that rename is unwanted, the override can be dropped, but the entity merge may then need the param mapped differently.

Checklist

  • I performed a self-review of my code
  • I manually tested my code change (please list details in description) — not possible locally; requires the Speakeasy regen workflow
  • I added unit tests — n/a until regen
  • I updated the changelog — pending regen
  • I updated the public facing docs — docs are generated on regen

Generated by Claude Code

Map GET /resources/{resource_id}/message-channels into Resource#read#2
(wrapped as message_channels with computed message_channel_ids) and PUT
into Resource#create#4 + Resource#update#3, mirroring the existing group
message-channels overlay pattern. The standalone
opal_resource_message_channel_list data source mapping is kept.

Addresses #197
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.

1 participant