spacelift_context resource should default to using current space

Currently, the default space for a new context created using the Spacelift Terraform provider is “root”. This value only makes sense if the creation is occurring in the root space; otherwise it results in a error. A more rational / useful behavior would be to default to creating the context in the current space.

Note that this change is fully backwards compatible because today the only place the current default works is in the root and that use case would not change with this proposal.

Also note that this change would make using spaces simpler and more intuitive.

Workaround
Use spacelift_current_space to get the space_id of the current space and pass it as an additional argument to spacelift_context.
Problem
Minimizing boiler-plate code

Please authenticate to join the conversation.

Upvoters
Status

➡️ Planned

Board

💡 Feature Requests

Tags

Contexts

Date

Over 1 year ago

Subscribe to post

Get notified by email when there are changes.