New Year Sale ! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-1067 Topic 11 Question 6 Discussion

Actual exam question for Oracle's 1Z0-1067 exam
Question #: 6
Topic #: 11
[All 1Z0-1067 Questions]

Your company recently adopted a hybrid cloud architecture which requires them to migrate some of their on-premises web applications to Oracle Cloud Infrastructure OCI). You created a Terraform template which automatically provisions OCI resources such as compute instances, load balancer, and a database instance. After running the stack using the terraform apply command, it successfully launched the compute Instances and the load balancer, but it failed to create a new database Instance with the following error:

Service error:NotAuthorizedOrNotFound. shape VM.Standard2.4 not found, http status code: 404

You discovered that the resource quotas assigned to your compartment prevent you from using VM.Standard2.4 instance shapes available in your tenancy. You edit the Terraform script and replace the shape with VM.Standard2.2.

Which option would you recommend to re-run the terraform command to have required OCI resources provisioned with the least effort?

Show Suggested Answer Hide Answer
Suggested Answer: C

Command: refresh

The terraform refresh command is used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure. This can be used to detect any drift from the last-known state, and to update the state file.

This does not modify infrastructure, but does modify the state file. If the state is changed, this may cause changes to occur during the next plan or apply.

Command: plan

The terraform plan command is used to create an execution plan. Terraform performs a refresh, unless explicitly disabled, and then determines what actions are necessary to achieve the desired state specified in the configuration files.

This command is a convenient way to check whether the execution plan for a set of changes matches your expectations without making any changes to real resources or to the state

Command: apply

The terraform apply command is used to apply the changes required to reach the desired state of the configuration, or the pre-determined set of actions generated by a terraform plan execution plan.

Adding the --auto-approve option avoids having to type 'yes' at a confirmation prompt

Note: Terraform will automatically refresh the state before running a command that would rely on it (such as plan, apply, destroy)


Contribute your Thoughts:

André L Aro
3 years ago
The correct answer is "C - Terraform local-exec", because it is necessary to "write them to a file and save it in your laptop" https://www.terraform.io/language/resources/provisioners/local-exec
upvoted 1 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77