Skip to content

Deleting a service_dynamic_snippet_content resource has no effect even if manage_snippets is true #968

Open
@landrew57

Description

@landrew57

Current Behaviour

The service_dynamic_snippet_content resource cannot be deleted. The code does not do anything if in the delete scenario:

func resourceServiceDynamicSnippetDelete(_ context.Context, d *schema.ResourceData, _ any) diag.Diagnostics {
// Dynamic snippet content cannot be deleted. Removing from state only
d.SetId("")
return nil
}

Expected Behaviour

The contents of the dynamic snippet are deleted if manage_snippets is set to true. If manage_snippets is false it makes sense to have delete as a noop.

Other comments

I have some code that I am testing locally. I can write tests and raise a PR if this sounds like desired behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions