Create a Environment using Platform as Code
Define a Environment in a YAML or JSON file and synchronize it from your Git repository.
Important
Ensure that your Git repository is connected to Axio before creating Environments using Platform as Code. After committing the Environment definition, synchronize the repository from Platform as Code → Synchronizations manually or using a configured schedule.
Step-by-Step Guide
1
Define Environment
Create a Environment definition in YAML or JSON.
2
Commit and Push
Commit the Environment definition and push it to your Git repository.
3
Synchronize with Axio
Go to Platform as Code → Synchronizations and synchronize the connected repository manually using Sync now, or configure a schedule for automatic synchronization.
4
Environment Created
After a successful synchronization, the Environment appears under the Workspace specified in its definition.
apiVersion: platform.axio.io/v1
kind: Environment
metadata:
name: development
spec:
displayName: Development Environment
project: ecommerce
description: Development workspace
{
"apiVersion": "platform.axio.io/v1",
"kind": "Environment",
"metadata": {
"name": "development"
},
"spec": {
"displayName": "Development Workspace",
"project": "ecommerce",
"description": "Development workspace"
}
}
Repository Structure
platform-resources/
└── environments/
├── development.yaml
├── production.yaml
What Happens Next?
- The Environment is created in Axio.
- The Environment appears under the Workspace specified in its definition.
- You can manually synchronize the repository again using Sync now.
- You can configure a synchronization schedule to periodically reconcile repository changes.
- You can manage the Environment and its associated infrastructure from the Axio platform.