HashiCorp Certified: Terraform Associate (003) (HCTA0-003) Terraform-Associate-003 Question # 4 Topic 1 Discussion

HashiCorp Certified: Terraform Associate (003) (HCTA0-003) Terraform-Associate-003 Question # 4 Topic 1 Discussion

Terraform-Associate-003 Exam Topic 1 Question 4 Discussion:
Question #: 4
Topic #: 1

You modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state without destroying the existing resource?

Original configuration:

resource "aws_s3_bucket" "photoes" {

bucket_prefix = "images"

}

Updated configuration:

resource "aws_s3_bucket" "photos" {

bucket_prefix = "images"

}


A.

moved {

from = aws_s3_bucket.photoes

to = aws_s3_bucket.photos

}


B.

moved {

bucket.photoes = aws_s3_bucket.photos

}


C.

moved {

aws_s3_bucket.photoes = aws_s3_bucket.photos

}


D.

None. Terraform will automatically update the resource ID.


Get Premium Terraform-Associate-003 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.