CLI Commands
CLI Commands
Command Structure
All Cloudscript CLI commands follow this basic structure:
Where:
command
is one of: convert, plan, apply, destroypath
is either a file path or directory pathoptions
are additional flags and parameters
cloud convert
Synopsis
Description
Converts .cloud
configuration files into standard infrastructure code, generating Terraform, Kubernetes, and Ansible configurations.
Path Requirements
If your
.cloud
file references external files (usingfile()
), provide the directory containing both the.cloud
file and referenced filesIf no external files are referenced, you can provide either the
.cloud
file path or its containing directory
Behavior
Validates the
.cloud
file syntaxCreates/overwrites the IaC directory
Generates:
Terraform configurations (main.tf.json)
Kubernetes manifests (resources.yml)
Ansible playbooks (playbook.yml)
Pre-processes any file references
Warning
Converting will:
Overwrite all existing content in the IaC directory
Make previously deployed resources unmanageable via
cloud destroy
Example
cloud plan
Synopsis
Description
Performs a comprehensive dry-run of your infrastructure deployment, analyzing all components:
Terraform plan for infrastructure changes
Kubernetes dry-run for container configurations
Ansible check mode for configuration management
Capabilities
Validates syntax and configuration
Detects potential deployment issues
Shows detailed change preview
Identifies missing dependencies
Validates network configurations
Checks security group settings
Example Output
cloud apply
Synopsis
Description
Deploys your infrastructure by executing:
Terraform apply for cloud resources
Kubernetes apply for container workloads
Ansible playbook for configuration management
Features
Automatic SSH key management
Network access configuration
Security group management
Error handling
Progress tracking
Options
--auto-approve
: Skip interactive approval
Important Notes
Requires appropriate cloud provider credentials
Handles both AWS and GCP deployments
Manages dependencies between components
Provides real-time deployment status
Supports rollback on failure
Example
cloud destroy
Synopsis
Description
Removes all deployed infrastructure components in the correct order:
Removes container workloads
Terminates cloud resources
Cleans up associated configurations
Safety Features
Interactive confirmation required
Resource dependency checking
Staged deletion process
State verification
Options
--auto-approve
: Skip confirmation prompt
Example
Warning
The destroy command will permanently remove all resources. Ensure you have:
Backed up any important data
Verified the correct path
Understood which resources will be removed
Last updated