Skip to content

Instantly share code, notes, and snippets.

@sgtoj
Last active August 2, 2023 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgtoj/39d506fbb697a7f2e5ac1023714d5d0f to your computer and use it in GitHub Desktop.
Save sgtoj/39d506fbb697a7f2e5ac1023714d5d0f to your computer and use it in GitHub Desktop.
JSONSchema for CloudPosse's `atmos` stack files
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "tf-component-stacks",
"title": "component-stack",
"type": "object",
"properties": {
"import": {
"type": "array",
"items": {
"type": "string"
}
},
"components": {
"type": "object",
"properties": {
"helmfile": {},
"terraform": {
"type": "object",
"patternProperties": {
".+": {
"properties": {
"remote_state_backend": {},
"remote_state_backend_type": {},
"settings": {},
"backend": {},
"backend_type": {},
"deps": {},
"command": {},
"env": {},
"metadata": {},
"workspace": {},
"inheritance": {},
"sources": {},
"component": {
"type": "string"
},
"vars": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"environment": {
"type": "string"
},
"label_key_case": {
"type": "string"
},
"label_value_case": {
"type": "string"
},
"localstack_enabled": {
"type": "boolean"
},
"namespace": {
"type": "string"
},
"region": {
"type": "string",
"enum": [
"us-east-1"
]
},
"sandbox_mode_enabled": {
"type": "boolean"
},
"stage": {
"type": "string"
},
"tags": {
"type": "object",
"required": [
"env"
],
"patternProperties": {
"[a-zA-Z0-9_-]+": {
"type": "string"
}
}
},
"name": {
"type": "string",
"pattern": ".+"
}
}
}
},
"additionalProperties": false
}
}
}
},
"additionalProperties": false
},
"env": {
"type": "object",
"patternProperties": {
".+": {
"type": [
"boolean",
"number",
"string"
]
}
}
},
"terraform": {
"properties": {
"remote_state_backend": {},
"remote_state_backend_type": {},
"settings": {},
"backend": {},
"backend_type": {},
"deps": {},
"command": {},
"env": {},
"metadata": {},
"workspace": {},
"inheritance": {},
"sources": {},
"s3": {}
},
"additionalProperties": false
},
"vars": {
"type": "object",
"properties": {
"environment": {
"type": "string"
},
"label_key_case": {
"type": "string"
},
"label_value_case": {
"type": "string"
},
"namespace": {
"type": "string"
},
"stage": {
"type": "string"
},
"tags": {
"type": "object",
"patternProperties": {
".+": {
"type": [
"boolean",
"number",
"string"
]
}
}
}
}
}
},
"patternProperties": {
"[.].+": {}
},
"additionalProperties": false
}
@sgtoj
Copy link
Author

sgtoj commented Aug 2, 2023

reserved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment