Debug Terraform Deployment Logs
Terraform module for OCI Logging is used to create logs and log groups for OCI services and custom logs. This log will help to identify and debug the failures or errors that occur during the terraform run.
To view Terraform logs:
- Go to Terraform Stack: https://cloud.oracle.com/resourcemanager/stacks.
- Select the compartment name where you created the stack from left side selector menu.
- Click on the created stack.
- Click on the recent job which failed.
- Scroll down to bottom to check the error which caused the failure.
The following screenshot shows a sample Terraform Logs screen:
Recommended Practices
There are some constrains while creating Terraform. Please consider the following points for successful completion of the resource creation using Terraform.
- b2c_auth and cx_rest_api_key in stack configuration page should be base64 encoded.
- Minimum amount of data in the object storage bucket is required for successful completion of modal building.
- Object storage should be manually deleted. The destroy flow will fail at first run, and you need to delete the bucket and rerun the destroy job.
- Vault secrets are deleted only after a day and Master Encryption Keys are deleted only after a week; hence compartment will not be deleted in stack destroy flow.
- You should manually delete the vault secrets and Master Encryption Keys.
- group-name, compartment-name, policy name and bucket name should be unique in tenancy.