Skip to content

Unable to remove postgresql_role from state without working DB provider #545

@jimbutler

Description

@jimbutler

I am working in a DR recovery scenario and I want to be able to remove DB items from TF state when they no longer exist or are corrupt.

I want to remove a postgresql_role from the state only, but I cannot do this without referencing the provider. However, because this is a DR scenario, the provider is not able to connect to the DB, so the plan fails. Note that I am using lifecycle=false, to indicate that I only want the state to be affected, i.e. there is no need to talk to the DB.

Remove:
`removed {
lifecycle {
destroy = false
}

from = postgresql_role.postgres_iam_user
}`

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