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

Ordering issue when deleting config store linked to compute service #876

Open
joeshaw opened this issue Jul 26, 2024 · 1 comment
Open

Comments

@joeshaw
Copy link
Member

joeshaw commented Jul 26, 2024

Terraform Version

Terraform v1.6.4 via Terraform Enterprise

Affected Fastly Terraform Resource(s)

Please list the affected resources, for example:

  • fastly_service_compute
  • fastly_configstore

Expected Behavior

I have a compute service which has a resource link to a config store. In a tf update, I am unlinking the store and deleting it. I expect that the service would be updated first to remove the link, then the config store would be deleted.

Actual Behavior

The config store is attempted to be deleted first, and errors because there is an existing link to a service.

I think the issue is a lack of an implicit dependency between the service and the resource.

Steps to Reproduce

  1. Create a config store resource (not sure if this also applies to KV or secret stores)
  2. Add some entries to the config store
  3. Create a compute service
  4. Link the resource to the compute service
  5. Delete the resource link, config store entries, and config store. Try to apply the plan, and you should get an error as it tries to delete the resource before updating the service to remove the resource link.
@kpfleming
Copy link
Contributor

That's going to be tricky, because the Config Store can't be deleted until after the new service-version (which does not reference it) has been activated. It's not sufficient to just clone the 'active' service-version and remove the Config Store link; that service-version has to be made inactive before the existing link will become inactive itself.

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