1. Pull, push, compare and validate resources

Create resources

You can create resources by adding a YAML file to the working directory. Be sure to follow the naming conventions shown in the following table and the directory structure shown in the example.

Resource typeFile extensionPath
Option list.optionList.yamloptionLists
Entity definition.definition.yamldefinitions
Entity.entity.yamlentities/<definition_name>
Policy.policy.yamlpolicies

The working folder structure is as follows:


[working folder]
├── optionLists
│  ├── DemoOptionListOne.optionList.yaml
│  └── DemoOptionListTwo.optionList.yaml
├── definitions
│  ├── DemoEntityDefinitionOne.definition.yaml
│  └── DemoEntityDefinitionTwo.definition.yaml
├── entities
│  └── DemoEntityDefinitionOne
│    └── EntityOne.entity.yaml
├── policies
│  └── DemoPolicy.policy.yaml

To edit YAML files in Visual Studio Code:

  1. Initialize your working directory. This creates the JSON schemas for the supported resource types.
  2. Install the YAML extension for Visual Studio Code. The JSON schemas automatically apply to the resource YAML files based on their file extension. As you type, the schemas provide validation and auto-completion for many commonly used properties.
If you have suggestions for improving this article, let us know!