spaces
This component is responsible for creating and managing the spaces in the Spacelift organization.
Usage
Stack Level: Global
The following are example snippets of how to use this component:
# stacks/catalog/spacelift/spaces.yaml
components:
terraform:
spaces:
metadata:
component: spacelift/spaces
settings:
spacelift:
administrative: true
space_name: root
vars:
spaces:
# root is a special space that is the parent of all other spaces and cannot be deleted or renamed. Only the
# policies block is actually consumed by the component to create policies for the root space.
root:
parent_space_id: root
description: The root space
inherit_entities: true
policies:
GIT_PUSH Global Administrator:
type: GIT_PUSH
body_url: https://raw.githubusercontent.com/cloudposse/terraform-spacelift-cloud-infrastructure-automation/%s/catalog/policies/git_push.administrative.rego
TRIGGER Global Administrator:
type: TRIGGER
body_url: https://raw.githubusercontent.com/cloudposse/terraform-spacelift-cloud-infrastructure-automation/%s/catalog/policies/trigger.administrative.rego
GIT_PUSH Proposed Run:
type: GIT_PUSH
body_url: https://raw.githubusercontent.com/cloudposse/terraform-spacelift-cloud-infrastructure-automation/%s/catalog/policies/git_push.proposed-run.rego
GIT_PUSH Tracked Run:
type: GIT_PUSH
body_url: https://raw.githubusercontent.com/cloudposse/terraform-spacelift-cloud-infrastructure-automation/%s/catalog/policies/git_push.tracked-run.rego
PLAN Default:
type: PLAN
body_url: https://raw.githubusercontent.com/cloudposse/terraform-spacelift-cloud-infrastructure-automation/%s/catalog/policies/plan.default.rego
TRIGGER Dependencies:
type: TRIGGER
body_url: https://raw.githubusercontent.com/cloudposse/terraform-spacelift-cloud-infrastructure-automation/%s/catalog/policies/trigger.dependencies.rego
PLAN Warn On Resource Changes Except Image ID:
type: PLAN
body_url: https://raw.githubusercontent.com/cloudposse/terraform-spacelift-cloud-infrastructure-automation/%s/catalog/policies/plan.warn-on-resource-changes-except-image-id.rego
core:
parent_space_id: root
description: The space for the core tenant
inherit_entities: true
labels:
- core
plat:
parent_space_id: root
description: The space for platform tenant
inherit_entities: true
labels:
- plat
Variables
Required Variables
spaces
requiredA map of all Spaces to create in Spacelift
Type:
map(object({
parent_space_id = string,
description = optional(string),
inherit_entities = optional(bool, false),
labels = optional(set(string), []),
policies = optional(map(object({
body = optional(string),
body_url = optional(string),
body_url_version = optional(string, "master"),
body_file_path = optional(string),
type = optional(string),
labels = optional(set(string), []),
})), {}),
}))
Optional Variables
Context Variables
The following variables are defined in the context.tf
file of this module and part of the terraform-null-label pattern.
context.tf
file of this module and part of the terraform-null-label pattern.Outputs
Dependencies
Requirements
terraform
, version:>= 1.3
aws
, version:>= 4.0, < 6.0.0
spacelift
, version:>= 0.1.31
Modules
Name | Version | Source | Description |
---|---|---|---|
policy | 1.7.2 | cloudposse/cloud-infrastructure-automation/spacelift//modules/spacelift-policy | n/a |
space | 1.7.2 | cloudposse/cloud-infrastructure-automation/spacelift//modules/spacelift-space | n/a |
this | 0.25.0 | cloudposse/label/null | n/a |