Component Modules

Providers

The providers component modules is where the cloud providers for the deployment are specified. Cloudscript also supports the deployment of different components within the same service to different providers.

providers {
  aws {
    provider = "aws"
    region   = "us-east-1"
  }
  google {
    provider = "google"
    project  = "my-gcp-project"
    region   = "us-central1"
  }
}
Providers

Custom Types

As mentioned within syntax features, custom types can be defined to reduce repetition and enforce variable definition.

type Instance {
    base: ComputeInstance
    name: string = "default-instance"
    size: "t2.micro" | "t2.small" = "t2.micro"
}
Syntax Features

Service Blocks

Service blocks contain the majority of the Cloudscript code, including the default provider, infrastructure, configuration, containers and deployment specifications.

Service Blocks

Last updated