Skip to content

Add system_relationship to opslevel_component_type#14723)#645

Merged
saditya370 merged 3 commits intoOpsLevel:mainfrom
saditya370:feat/system-relationship
Apr 21, 2026
Merged

Add system_relationship to opslevel_component_type#14723)#645
saditya370 merged 3 commits intoOpsLevel:mainfrom
saditya370:feat/system-relationship

Conversation

@saditya370
Copy link
Copy Markdown
Collaborator

Summary

  • Mirror the existing owner_relationship implementation to add system_relationship on the opslevel_component_type resource and datasources
  • Bump opslevel-go dependency to v2026.4.13 (OpsLevel/opslevel-go#610) which exposes SystemRelationship on ComponentType and ComponentTypeInput
  • Customer request: Springer Nature (account 1174, issue #14687)

Changes

  • Resource: added system_relationship attribute with management_rules nested block (Create/Update/Read)
  • Datasources: added system_relationship to both opslevel_component_type and opslevel_component_types datasources
  • Tests: added field accessibility assertions and a dedicated resource_component_type_system_relationship test case
  • Docs: regenerated via task docs — additive sections for system_relationship on all 3 doc pages

Notes

  • system_relationship is structurally identical to owner_relationship (single management_rules field, same ManagementRuleInput element type) — confirmed against the backend Ruby source
  • componentTypePropagateSystemRelationship is intentionally out of scope — it's a one-shot bulk operation that doesn't map to declarative Terraform, and there's no precedent for it with owner_relationship

Test plan

  • go build ./... — passes
  • task test — 104 passed, 0 failed
  • Schema introspection against local backend confirms systemRelationship on both ComponentType and ComponentTypeInput
  • End-to-end componentTypeCreate mutation with systemRelationship round-trips correctly
  • task apply with a real system_relationship config against a sandbox account (manual verification)

Dependency

Aditya Singh added 2 commits April 14, 2026 15:05
Mirror the existing owner_relationship implementation to support
system_relationship on the opslevel_component_type resource and
datasources. Bump opslevel-go to v2026.4.13 which exposes
SystemRelationship on ComponentType and ComponentTypeInput.
@saditya370 saditya370 changed the title Add system_relationship attribute to opslevel_component_type (#14687) Fix component type update silently deleting relationship definitions (#14723) Apr 17, 2026
@andrewstillv15
Copy link
Copy Markdown
Contributor

I think that the MR title is incorrect.

Comment thread opslevel/datasource_opslevel_component_type.go Outdated
@saditya370 saditya370 changed the title Fix component type update silently deleting relationship definitions (#14723) Add system_relationship to opslevel_component_type#14723) Apr 20, 2026
@saditya370 saditya370 closed this Apr 20, 2026
@saditya370 saditya370 reopened this Apr 20, 2026
@saditya370
Copy link
Copy Markdown
Collaborator Author

I think that the MR title is incorrect.

Thanks , fixed

@saditya370 saditya370 merged commit 29826fe into OpsLevel:main Apr 21, 2026
4 of 8 checks passed
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