spacelift-io / terraform-provider-spacelift

Terraform provider to interact with Spacelift
MIT License
77 stars 29 forks source link

feat: spacelift_stack save md5 hash of import_state to state and force new #588

Closed Apollorion closed 6 days ago

Apollorion commented 1 week ago

DO NOT MERGE

Need to think through how to make this work without causing everyones stack to update on provider update.

We should not save the state to state when using import_state. It causes huge amounts of memory to get consumed while terraform validates state and can cause statefiles to bloat dependending on how many stacks are created in one statefile.

One option would be to set import_state to an empty string after the stack is created. But wanted to get ideas on if theres a better way to do this, which is why I tried to MD5 it instead.