Hi, I have been considering alternative approaches to manage the complete lifecycle of terraform resources with this operator, and was looking for your feedback which is preferred, or perhaps what you had in mind but did not implement yet.
Problem statement:
Need to create 3 separate resources to manage complete lifecycle of a Terraform resource, would instead like to use 1 resource. This will enable
Proposal A:
Modify code to migrate TerraformPlan, TerraformApply and TerraformDestroy into one CRD, which can have its spec have a field like apply: true/false to determine whether a plan or apply is ran, then have its finalizer ensure a destroy is ran before deleting resource.
Proposal B:
Create a new metacontroller CRD, called TerraformModule, which manages TerraformPlan, TerraformApply and TerraformDestroy resources. (probably preferred option). This option may also let the apply be able to use the outputted tfplan file from plan step.
Thanks
Hi, I have been considering alternative approaches to manage the complete lifecycle of terraform resources with this operator, and was looking for your feedback which is preferred, or perhaps what you had in mind but did not implement yet.
Problem statement:
Need to create 3 separate resources to manage complete lifecycle of a Terraform resource, would instead like to use 1 resource. This will enable
Proposal A:
Modify code to migrate
TerraformPlan,TerraformApplyandTerraformDestroyinto one CRD, which can have its spec have a field likeapply: true/falseto determine whether aplanorapplyis ran, then have its finalizer ensure adestroyis ran before deleting resource.Proposal B:
Create a new metacontroller CRD, called
TerraformModule, which managesTerraformPlan,TerraformApplyandTerraformDestroyresources. (probably preferred option). This option may also let the apply be able to use the outputted tfplan file from plan step.Thanks