flux-iac/tofu-controller

Implement the `CreateWorkspaceBlob` gRPC function to create, compress, encrypt, and retrieve Workspace BLOBs from the tf-runner.

Closed this issue · 2 comments

From #911

Creating Workspace BLOB: The TF-Controller invokes a new gRPC function named "CreateWorkspaceBlob".
The content of the Workspace file system is compressed using tar and gzip to produce the Workspace BLOB.
The TF-Controller retrieves this BLOB as a byte array via the return value of the CreateWorkspaceBlob gRPC function.

Creation, compression and encryption process are done in tf-runner.

@chanwit to clarify what needs to happen, the when calling CreateWorkspaceBlob, the tf-runner should zip the terraform.tfstate.d directory and return that as the payload?

Not that dir, but the whole terraform dir that is extracted.

Basically the idea is to keep everything after code generation (vars, secrets, configmap) as a tar gz blob.