Create a Workspace using Platform as Code
Define a Workspace in a YAML or JSON file and synchronize the Workspace with Axio from your Git repository.
Important
Ensure that your Git repository is connected to Axio before creating Workspaces using Platform as Code. You can synchronize the repository manually or configure scheduled synchronization from Platform as Code → Synchronizations.
Step-by-Step Guide
Define Workspace
Create a Workspace definition in YAML or JSON.
Commit and Push
Commit the Workspace definition and push it to your Git repository.
Platform Synchronization
Synchronize the connected Git repository from Platform as Code → Synchronizations. You can click Sync now for an immediate synchronization or enable Auto to configure scheduled synchronization.
Workspace Created
After a successful synchronization, the Workspace appears under the selected Project and is ready for creating Environments.
apiVersion: platform.axio.io/v1
kind: Workspace
metadata:
name: development
spec:
displayName: Development Workspace
project: ecommerce
description: Development workspace
{
"apiVersion": "platform.axio.io/v1",
"kind": "Workspace",
"metadata": {
"name": "development"
},
"spec": {
"displayName": "Development Workspace",
"project": "ecommerce",
"description": "Development workspace"
}
}
Repository Structure
platform-resources/
└── workspaces/
├── development.yaml
├── production.yaml
What Happens Next?
- The Workspace is created in Axio after a successful synchronization.
- The Workspace appears under the selected Project.
- You can synchronize Git changes manually using Sync now.
- You can enable scheduled synchronization to periodically apply Git changes.
- You can create and manage Environments within the Workspace.
Tip
Keep Workspace definitions in Git to maintain version history and manage Workspace changes through your repository workflow.