Expose message_channel_ids on opal_resource via overlay entity mapping - #203
Draft
claude[bot] wants to merge 1 commit into
Draft
Expose message_channel_ids on opal_resource via overlay entity mapping#203claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested via Slack thread
Linear: COR-5621
Description of the change
Addresses #197.
Before:
opal_resourcehas nomessage_channel_idsattribute, even though the API supportsGET/PUT /resources/{resource_id}/message-channels— so audit-message channels on resources can't be managed in Terraform (only read via theopal_resource_message_channel_listdata source).After:
opal_resourcegains a settablemessage_channel_idsattribute (plus computedmessage_channels), matching whatopal_groupalready offers.Approach: overlay-only entity-mapping change in
terraform_overlay.yaml, mirroring the existing group pattern — the GET is merged into the resource entity asResource#read#2(responseallOf-wrapped withx-speakeasy-wrapped-attribute: message_channelsandx-speakeasy-param-suppress-computed-diff), and the PUT becomesResource#create#4+Resource#update#3with the 200 response ignored. The standaloneopal_resource_message_channel_listdata source mapping is kept alongside via a multi-entity operation list (same precedent asGroup#delete+AccessRule#delete).How / notes for maintainers:
internal/sdk/,openapi.yaml, anddocs/are Speakeasy-generated, so this PR intentionally touches onlyterraform_overlay.yaml— please run thesdk_generationworkflow on this branch to regenerate before un-drafting (same flow as #200). On regen, please double-check: (1)opal_resourceis widely used, so state-upgrader/import impact of the new attributes should be verified (internal/stateupgraders); (2) the newx-speakeasy-name-override: idon the GET parameter may rename theopal_resource_message_channel_listdata source'sresource_idargument toid(as happened foropal_resource_visibility) — if that rename is unwanted, the override can be dropped, but the entity merge may then need the param mapped differently.Checklist
Generated by Claude Code