Courseiva
Resource Lifecycle ManagementhardMultiple SelectObjective-mapped

AWS provider Resource Lifecycle Management Practice Question

Which TWO actions can be taken to resolve issues where a resource must be replaced, but 'prevent_destroy' is enabled?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Run 'terraform state rm' to remove the resource from state and re-import.

You must either remove the meta-argument from the code or use the state management to remove the resource constraint before re-applying.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use 'terraform apply -auto-approve'.

    Why it's wrong here

    This ignores the constraint, it does not bypass it.

  • Run 'terraform state rm' to remove the resource from state and re-import.

    Why this is correct

    This removes the resource and its associated constraints.

  • Use 'terraform refresh' to update the constraint.

    Why it's wrong here

    Refresh does not alter lifecycle rules.

  • Remove the prevent_destroy block from the configuration.

    Why this is correct

    Required to allow destruction.

  • Set the prevent_destroy argument to false in the CLI.

    Why it's wrong here

    This is not possible via CLI.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This AWS provider question is part of Courseiva's 193-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official HashiCorp exam blueprint

This AWS provider practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AWS provider exam.