- Have a look at the variables.tf
- Have a look at the configuration.auto.tfvars
- Have a look at the outputs.tf and see that the outputs will expose the values for the defined local variables.
- Understand the graph structure of the configuration variable.
- See the current dependency graph build by terraform:
terraform graph | dot -Tsvg > initial_graph.svg
- You'll need to install
xdot
on mac:brew install xdot
- You'll need to install
- Edit the locals.tf and write the needed routine to get in the categories local variable a map of all categories.
- Edit the locals.tf and write the needed routine to get in the vcns local variable a map of all vcns. Each value of the key/value pair element should contain the parrent category key.
- Edit the locals.tf and write the needed routine to get in the subnets local variable a map of all subnets. Each value of the key/value pair element should contain the parrent category key and the parrent vcn key.
- Run teraform init and terraform apply:
- NOTE - No need for credentials as we're not going to connect to OCI or create any resource.
- Examine the output for the expected result.
- Modify the configuration by adding or removing elements and run terraform apply again.
- See the current dependency graph build by terraform:
terraform graph | dot -Tsvg > updated_graph.svg
- Compare
initial_graph.svg
withupdated_graph.svg