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 type |
File extension |
Path |
---|---|---|
Option list |
|
|
Entity definition |
|
|
Entity |
|
|
Policy |
|
|
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:
-
Initialize your working directory. This creates the JSON schemas for the supported resource types.
-
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.