Q: 10
[Interact with Terraform Modules]
Using the terraform state rm command against a resource will destroy it.
Options
Discussion
Nope, that's false.
Guessing False. terraform state rm just removes the resource from the state file, but leaves the actual infra (like an EC2 instance) running. It won't trigger any deletion in the provider. Only terraform destroy or a remove-from-config plus apply will actually destroy something. Pretty sure that's the intent here, but open to correction.
False tbh. Had something like this in a mock and removing from state just untracks the resource, it doesn't destroy it in the cloud or wherever. Anyone disagree?
False. similar question popped up in a practice exam and state rm just removes from state, doesn’t delete real resources.
False .
terraform state rm only removes the resource from the state file, it doesn't touch the real infrastructure. You'd still see your EC2 or whatever out there unless you delete it separately. That's how I've seen it behave, but let me know if I'm missing some rare case.Be respectful. No spam.