{"id":23861637,"url":"https://github.com/masterpointio/terraform-spacelift-spaces","last_synced_at":"2026-06-02T10:30:16.711Z","repository":{"id":263590935,"uuid":"888545177","full_name":"masterpointio/terraform-spacelift-spaces","owner":"masterpointio","description":"Terraform module to configure and provision Spacelift Spaces for organizing and managing infrastructure resources across projects","archived":false,"fork":false,"pushed_at":"2025-02-02T10:56:10.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T10:33:43.901Z","etag":null,"topics":["opentofu","opentofu-module","spacelift","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://masterpoint.io","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masterpointio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T15:26:54.000Z","updated_at":"2025-02-13T04:57:23.000Z","dependencies_parsed_at":"2024-11-19T12:04:16.485Z","dependency_job_id":"8ab79a77-2360-46f8-a532-9486ba1acfba","html_url":"https://github.com/masterpointio/terraform-spacelift-spaces","commit_stats":null,"previous_names":["masterpointio/terraform-spacelift-spaces"],"tags_count":1,"template":false,"template_full_name":"masterpointio/terraform-module-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Fterraform-spacelift-spaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Fterraform-spacelift-spaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Fterraform-spacelift-spaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Fterraform-spacelift-spaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masterpointio","download_url":"https://codeload.github.com/masterpointio/terraform-spacelift-spaces/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170102,"owners_count":19759145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opentofu","opentofu-module","spacelift","terraform","terraform-module"],"created_at":"2025-01-03T06:56:28.105Z","updated_at":"2026-06-02T10:30:16.678Z","avatar_url":"https://github.com/masterpointio.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-spacelift-spaces\n\n[![Release](https://img.shields.io/github/release/masterpointio/terraform-spacelift-spaces.svg)](https://github.com/masterpointio/terraform-spacelift-spaces/releases/latest)\n\nThis root module is responsible for provisioning [Spacelift Spaces](https://docs.spacelift.io/concepts/spaces/).\n\nSpacelift Spaces serve as logical namespaces providing isolation and organization for infrastructure resources within the platform. They facilitate the management of different environments or projects by allowing distinct boundaries for access control, resource organization, and policy enforcement.\n\n## Usage\n\nHere’s how you can define the spaces variable in your Terraform configuration when calling the module:\n\n```hcl\nmodule \"spacelift_spaces\" {\n  source = \"masterpointio/spacelift/spaces\"\n  # Set a specific version\n  # version = \"X.X.X\"\n\n  spaces = {\n    \"dev\" = {\n      description      = \"Development environment space\"\n      inherit_entities = true\n      labels           = [\"dev\", \"environment\"]\n      parent_space_id  = \"rnd\"\n    }\n    \"prod\" = {\n      description      = \"Production environment space\"\n      inherit_entities = false\n      labels           = [\"prod\", \"environment\"]\n      parent_space_id  = \"rnd\"\n    }\n  }\n}\n```\n\nFor a complete example, see [examples/complete](./examples/complete/).\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Requirements\n\n| Name                                                                     | Version |\n| ------------------------------------------------------------------------ | ------- |\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement_terraform) | \u003e= 1.0  |\n| \u003ca name=\"requirement_spacelift\"\u003e\u003c/a\u003e [spacelift](#requirement_spacelift) | \u003e= 1.0  |\n\n## Providers\n\n| Name                                                               | Version |\n| ------------------------------------------------------------------ | ------- |\n| \u003ca name=\"provider_spacelift\"\u003e\u003c/a\u003e [spacelift](#provider_spacelift) | \u003e= 1.0  |\n\n## Modules\n\n| Name                                            | Source                | Version |\n| ----------------------------------------------- | --------------------- | ------- |\n| \u003ca name=\"module_this\"\u003e\u003c/a\u003e [this](#module_this) | cloudposse/label/null | 0.25.0  |\n\n## Resources\n\n| Name                                                                                                                  | Type     |\n| --------------------------------------------------------------------------------------------------------------------- | -------- |\n| [spacelift_space.default](https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/space) | resource |\n\n## Inputs\n\n| Name                                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Type                                                                                                                                                                                                           | Default                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Required |\n| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |\n| \u003ca name=\"input_additional_tag_map\"\u003e\u003c/a\u003e [additional_tag_map](#input_additional_tag_map)    | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.\u003cbr\u003eThis is for some rare cases where resources want additional configuration of tags\u003cbr\u003eand therefore take a list of maps with tag key, value, and additional configuration.                                                                                                                                                                                                                                                                                                                                                                                   | `map(string)`                                                                                                                                                                                                  | `{}`                                                                                                                                                                                                                                                                                                                                                                                                                                                              |    no    |\n| \u003ca name=\"input_attributes\"\u003e\u003c/a\u003e [attributes](#input_attributes)                            | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,\u003cbr\u003ein the order they appear in the list. New attributes are appended to the\u003cbr\u003eend of the list. The elements of the list are joined by the `delimiter`\u003cbr\u003eand treated as a single ID element.                                                                                                                                                                                                                                                                                                                                                                                        | `list(string)`                                                                                                                                                                                                 | `[]`                                                                                                                                                                                                                                                                                                                                                                                                                                                              |    no    |\n| \u003ca name=\"input_context\"\u003e\u003c/a\u003e [context](#input_context)                                     | Single object for setting entire context at once.\u003cbr\u003eSee description of individual variables for details.\u003cbr\u003eLeave string and numeric variables as `null` to use default value.\u003cbr\u003eIndividual variable settings (non-null) override settings in context object,\u003cbr\u003eexcept for attributes, tags, and additional_tag_map, which are merged.                                                                                                                                                                                                                                                                                                                            | `any`                                                                                                                                                                                                          | \u003cpre\u003e{\u003cbr\u003e \"additional_tag_map\": {},\u003cbr\u003e \"attributes\": [],\u003cbr\u003e \"delimiter\": null,\u003cbr\u003e \"descriptor_formats\": {},\u003cbr\u003e \"enabled\": true,\u003cbr\u003e \"environment\": null,\u003cbr\u003e \"id_length_limit\": null,\u003cbr\u003e \"label_key_case\": null,\u003cbr\u003e \"label_order\": [],\u003cbr\u003e \"label_value_case\": null,\u003cbr\u003e \"labels_as_tags\": [\u003cbr\u003e \"unset\"\u003cbr\u003e ],\u003cbr\u003e \"name\": null,\u003cbr\u003e \"namespace\": null,\u003cbr\u003e \"regex_replace_chars\": null,\u003cbr\u003e \"stage\": null,\u003cbr\u003e \"tags\": {},\u003cbr\u003e \"tenant\": null\u003cbr\u003e}\u003c/pre\u003e |    no    |\n| \u003ca name=\"input_delimiter\"\u003e\u003c/a\u003e [delimiter](#input_delimiter)                               | Delimiter to be used between ID elements.\u003cbr\u003eDefaults to `-` (hyphen). Set to `\"\"` to use no delimiter at all.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_descriptor_formats\"\u003e\u003c/a\u003e [descriptor_formats](#input_descriptor_formats)    | Describe additional descriptors to be output in the `descriptors` output map.\u003cbr\u003eMap of maps. Keys are names of descriptors. Values are maps of the form\u003cbr\u003e`{\u003cbr\u003e   format = string\u003cbr\u003e   labels = list(string)\u003cbr\u003e}`\u003cbr\u003e(Type is `any` so the map values can later be enhanced to provide additional options.)\u003cbr\u003e`format` is a Terraform format string to be passed to the `format()` function.\u003cbr\u003e`labels` is a list of labels, in order, to pass to `format()` function.\u003cbr\u003eLabel values will be normalized before being passed to `format()` so they will be\u003cbr\u003eidentical to how they appear in `id`.\u003cbr\u003eDefault is `{}` (`descriptors` output will be empty). | `any`                                                                                                                                                                                                          | `{}`                                                                                                                                                                                                                                                                                                                                                                                                                                                              |    no    |\n| \u003ca name=\"input_enabled\"\u003e\u003c/a\u003e [enabled](#input_enabled)                                     | Set to false to prevent the module from creating any resources                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | `bool`                                                                                                                                                                                                         | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_environment\"\u003e\u003c/a\u003e [environment](#input_environment)                         | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_id_length_limit\"\u003e\u003c/a\u003e [id_length_limit](#input_id_length_limit)             | Limit `id` to this many characters (minimum 6).\u003cbr\u003eSet to `0` for unlimited length.\u003cbr\u003eSet to `null` for keep the existing setting, which defaults to `0`.\u003cbr\u003eDoes not affect `id_full`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | `number`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_label_key_case\"\u003e\u003c/a\u003e [label_key_case](#input_label_key_case)                | Controls the letter case of the `tags` keys (label names) for tags generated by this module.\u003cbr\u003eDoes not affect keys of tags passed in via the `tags` input.\u003cbr\u003ePossible values: `lower`, `title`, `upper`.\u003cbr\u003eDefault value: `title`.                                                                                                                                                                                                                                                                                                                                                                                                                               | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_label_order\"\u003e\u003c/a\u003e [label_order](#input_label_order)                         | The order in which the labels (ID elements) appear in the `id`.\u003cbr\u003eDefaults to [\"namespace\", \"environment\", \"stage\", \"name\", \"attributes\"].\u003cbr\u003eYou can omit any of the 6 labels (\"tenant\" is the 6th), but at least one must be present.                                                                                                                                                                                                                                                                                                                                                                                                                             | `list(string)`                                                                                                                                                                                                 | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_label_value_case\"\u003e\u003c/a\u003e [label_value_case](#input_label_value_case)          | Controls the letter case of ID elements (labels) as included in `id`,\u003cbr\u003eset as tag values, and output by this module individually.\u003cbr\u003eDoes not affect values of tags passed in via the `tags` input.\u003cbr\u003ePossible values: `lower`, `title`, `upper` and `none` (no transformation).\u003cbr\u003eSet this to `title` and set `delimiter` to `\"\"` to yield Pascal Case IDs.\u003cbr\u003eDefault value: `lower`.                                                                                                                                                                                                                                                                          | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_labels_as_tags\"\u003e\u003c/a\u003e [labels_as_tags](#input_labels_as_tags)                | Set of labels (ID elements) to include as tags in the `tags` output.\u003cbr\u003eDefault is to include all labels.\u003cbr\u003eTags with empty values will not be included in the `tags` output.\u003cbr\u003eSet to `[]` to suppress all generated tags.\u003cbr\u003e**Notes:**\u003cbr\u003e The value of the `name` tag, if included, will be the `id`, not the `name`.\u003cbr\u003e Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be\u003cbr\u003e changed in later chained modules. Attempts to change it will be silently ignored.                                                                                                                                                            | `set(string)`                                                                                                                                                                                                  | \u003cpre\u003e[\u003cbr\u003e \"default\"\u003cbr\u003e]\u003c/pre\u003e                                                                                                                                                                                                                                                                                                                                                                                                                                   |    no    |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input_name)                                              | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.\u003cbr\u003eThis is the only ID element not also included as a `tag`.\u003cbr\u003eThe \"name\" tag is set to the full `id` string. There is no tag with the value of the `name` input.                                                                                                                                                                                                                                                                                                                                                                                                                      | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_namespace\"\u003e\u003c/a\u003e [namespace](#input_namespace)                               | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_regex_replace_chars\"\u003e\u003c/a\u003e [regex_replace_chars](#input_regex_replace_chars) | Terraform regular expression (regex) string.\u003cbr\u003eCharacters matching the regex will be removed from the ID elements.\u003cbr\u003eIf not set, `\"/[^a-zA-Z0-9-]/\"` is used to remove all characters other than hyphens, letters and digits.                                                                                                                                                                                                                                                                                                                                                                                                                                      | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_spaces\"\u003e\u003c/a\u003e [spaces](#input_spaces)                                        | A map of Spacelift Spaces to create. The key is the name of the Space.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | \u003cpre\u003emap(object({\u003cbr\u003e description = optional(string, null)\u003cbr\u003e inherit_entities = optional(bool, false)\u003cbr\u003e labels = optional(list(string), null)\u003cbr\u003e parent_space_id = optional(string, \"root\")\u003cbr\u003e }))\u003c/pre\u003e | n/a                                                                                                                                                                                                                                                                                                                                                                                                                                                               |   yes    |\n| \u003ca name=\"input_stage\"\u003e\u003c/a\u003e [stage](#input_stage)                                           | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input_tags)                                              | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).\u003cbr\u003eNeither the tag keys nor the tag values will be modified by this module.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | `map(string)`                                                                                                                                                                                                  | `{}`                                                                                                                                                                                                                                                                                                                                                                                                                                                              |    no    |\n| \u003ca name=\"input_tenant\"\u003e\u003c/a\u003e [tenant](#input_tenant)                                        | ID element \\_(Rarely used, not included by default)\\_. A customer identifier, indicating who this instance of a resource is for                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | `string`                                                                                                                                                                                                       | `null`                                                                                                                                                                                                                                                                                                                                                                                                                                                            |    no    |\n\n## Outputs\n\n| Name                                                  | Description                                      |\n| ----------------------------------------------------- | ------------------------------------------------ |\n| \u003ca name=\"output_spaces\"\u003e\u003c/a\u003e [spaces](#output_spaces) | A map of Spacelift Spaces with their attributes. |\n\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Contributing\n\nContributions are welcome and appreciated!\n\nFound an issue or want to request a feature? [Open an issue](TODO)\n\nWant to fix a bug you found or add some functionality? Fork, clone, commit, push, and PR and we'll check it out.\n\nIf you have any issues or are waiting a long time for a PR to get merged then feel free to ping us at [hello@masterpoint.io](mailto:hello@masterpoint.io).\n\n## Built By\n\n[![Masterpoint Logo](https://i.imgur.com/RDLnuQO.png)](https://masterpoint.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterpointio%2Fterraform-spacelift-spaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasterpointio%2Fterraform-spacelift-spaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterpointio%2Fterraform-spacelift-spaces/lists"}