Reputation: 551
i have a big problem and i would like to know if there is someone here that can help me.
I create a small github project to show you the steps done, but at the end without positive results.
I need to create dynamic VCN on different compartments, using a json input file. The steps done was:
But i have some error:
So about my question: how can I deploy VCN's on different compartment filtering by compartment_name dynamically.
So I upload my code on this public repo : https://github.com/juliovg/multiples_vcns.git
If some can help me with this and also how can i OUTPUT the list of compartments ID's.
Upvotes: 0
Views: 265
Reputation: 96
Not sure, but I think the line
compartment_id = data.oci_identity_compartments.compartment_id.0.id
should be:
compartment_id = data.oci_identity_compartments.compartment_id[0].id
And maybe, you should work with a lookup...
compartment_id = lookup(data.oci_identity_compartments.compartment_id[0], "id")
Upvotes: 1