Loading...
Loading...
Creates, modifies and manages Infrahub object data YAML files for populating infrastructure instances — devices, locations, organizations, and modules. TRIGGER when: creating device instances, populating data files, defining locations or organizations, adding infrastructure objects, modifying or extending an existing data file, updating attribute values or relationship links on objects already defined in a data file, debugging why an object fails to load. DO NOT TRIGGER when: designing or modifying schemas, including changing an attribute or relationship definition on a node kind (use infrahub-managing-schemas), writing Python checks/generators, querying live data.
npx skill4agent add opsmill/infrahub-skills infrahub-managing-objectsfind . -name "*.yml" -path "*/schemas/*" -o -name "*schema*" -name "*.yml" 2>/dev/null | head -10find . -name "*.yml" -path "*/objects/*" 2>/dev/null | head -20/infrahub:managing-objects DcimDevice spine-01| Priority | Category | Prefix | Description |
|---|---|---|---|
| CRITICAL | Branch-First Loading | | Load onto a branch, not the default branch |
| CRITICAL | File Format | | apiVersion, kind, spec structure |
| CRITICAL | Value Mapping | | Attributes, dropdowns, references |
| HIGH | Children | | Hierarchy/component nesting |
| MEDIUM | Range | | Sequential interface expansion |
| MEDIUM | Organization | | Naming, load order, multi-doc |
| LOW | Patterns | | Flat lists, devices, git repos |
| If the object... | The schema must... | See |
|---|---|---|
| References another object across files | Define | ../infrahub-managing-schemas/rules/display-human-friendly-id.md |
| Sits in a location/parent tree | Use a hierarchical generic with | ../infrahub-managing-schemas/rules/hierarchy-setup.md |
| Sets a Dropdown attribute value | Declare the dropdown | ../infrahub-managing-schemas/rules/attribute-defaults-and-types.md |
| Owns Component children inline | The parent's Component relationship and child's Parent relationship must share an identifier and the child needs | ../infrahub-managing-schemas/rules/relationship-component-parent.md |
| Will be the target of an artifact pipeline | The concrete node must | ../infrahub-managing-schemas/rules/extension-artifact-target.md |
---
apiVersion: infrahub.app/v1
kind: Object
spec:
kind: <NodeKind> # Schema node kind (e.g., DcimDellServer)
data:
- <attribute>: <value> # List of object instancesapiVersionkind: Objectspec.kindspec.dataspec--branchmainvaluesourceowneris_protected--branchinfrahubctl object validateobject loadsourceowneris_protectedsourcedocs.infrahub.app