Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lifecycle key to integrations #235

Open
Abuelodelanada opened this issue Nov 28, 2024 · 1 comment
Open

Add lifecycle key to integrations #235

Abuelodelanada opened this issue Nov 28, 2024 · 1 comment

Comments

@Abuelodelanada
Copy link
Contributor

Abuelodelanada commented Nov 28, 2024

@amandahla mentioned:

For all juju_integration: Is there any situation where source/target application could be re-deployed?

If yes, then a lifecycle might be needed like the one in the documentation:
https://registry.terraform.io/providers/juju/juju/latest/docs/resources/integration

@Abuelodelanada said:

Oh, the lifecycle key is interesting!

I think it depends on the scope of this cos module. For a first version I would think we don't need it.

WDYT @sed-i ?

@MichaelThamm said:

I think this comment from @amandahla is important. This lifecycle option in the juju_integration was added due to this issue:

Which includes these steps to reproduce:

  1. Deploy an application with relations via terraform.
  2. Change its constraints and terraform apply
  3. See the relations are lost, rerun terraform apply to restore relations.

Our modules support constraints and there may be other scenarios (none that I know of) where TF may remove an application and then the relation is missing unless someone manually runs terraform apply.

This would affect the robustness of our TF deployment if not implemented, although a rare scenario.

@Abuelodelanada Abuelodelanada changed the title For all juju_integration: Is there any situation where source/target application could be re-deployed? Add lifecycle key to integrations Nov 28, 2024
@sed-i
Copy link
Contributor

sed-i commented Dec 6, 2024

We should try to understand:

  • Is the lifecycle an important concept in the juju-tf "state model" or if it's just a temporary workaround.
  • What would be the implications on our models. If it's minor then might as well just do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants