pub struct CloudServices {
pub provider: CloudProvider,
pub terraform: String,
pub vars: IndexMap<String, Value>,
pub outputs: IndexMap<String, String>,
pub hourly_usd: Option<f64>,
pub before: Vec<String>,
pub env: IndexMap<String, String>,
pub apply_retries: u8,
pub requires: Vec<String>,
}Expand description
An environment of cloud services: a Terraform module applied into the user’s account.
Fields§
§provider: CloudProviderThe cloud the module deploys into (its credentials come from the environment, as Terraform expects).
terraform: StringA Terraform root module in the project (a folder holding .tf files), used as is.
vars: IndexMap<String, Value>The module’s variables: any value (a string, number, boolean, list or map). A string
holding {{ inputs.NAME }}, at any depth (["{{ inputs.PLAYER_IP }}/32"]), takes the
launch-time input NAME (declared in inputs), e.g. the user’s IP for an allow-list:
required at isothrum up, kept for isothrum down.
outputs: IndexMap<String, String>What the environment exposes, by name: a module output each. Checks and the message
use them as {{ cloud.outputs.<name> }}.
hourly_usd: Option<f64>About what the environment costs per hour while it exists, in US dollars: the author’s
estimate, for whoever runs it. isothrum up says it before applying, and the resolved
snapshot carries it (cloud.hourly_usd) for anything that shows costs or keeps to a
budget. Isoloom doesn’t bill or stop anything by it.
before: Vec<String>Steps run on this machine before Terraform applies the module (a key pair the module
reads, a build): scripts in the project, run in order from the module’s copy, with the
spec’s inputs and env in their environment. They run at every isothrum up: make them
idempotent.
env: IndexMap<String, String>Environment variables for Terraform and the before steps (AWS_REGION: us-east-1).
Not for credentials: those come from the user’s own environment.
apply_retries: u8How many times to apply again when an apply fails (a module that only converges on a second apply), 0 to 5. 0 by default.
requires: Vec<String>What the module needs on this machine besides Terraform: a command name (jq, gsed)
that must be on the PATH, or a shell command that must succeed
(python3 -c 'import boto3'). isothrum up checks them before applying.
Implementations§
Source§impl CloudServices
impl CloudServices
Sourcepub fn input_of(value: &Value) -> Option<&str>
pub fn input_of(value: &Value) -> Option<&str>
The launch-time input a variable takes, when its value is exactly {{ inputs.NAME }}.
A value can also hold inputs inside its strings, at any depth: see
inputs_in.
Trait Implementations§
Source§impl Clone for CloudServices
impl Clone for CloudServices
Source§impl Debug for CloudServices
impl Debug for CloudServices
Source§impl<'de> Deserialize<'de> for CloudServices
impl<'de> Deserialize<'de> for CloudServices
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for CloudServices
impl JsonSchema for CloudServices
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more