Skip to content

Approaches to managing entire resource lifecycle via CRD #11

Description

@thejmazz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions