- Hello Team ,
I am getting error while creating two web servers through Terraform in Oracle Cloud . Please see below error and help us asap .
Refreshing Terraform state in-memory prior to plan…
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
data.oci_identity_availability_domains.toronto: Refreshing state…
Error: Invalid index
on vcn.tf line 119, in resource “oci_core_subnet” “subnet2”:
119: availability_domain = data.oci_identity_availability_domains.toronto.availability_domains[1][“name”]
|----------------
| data.oci_identity_availability_domains.toronto.availability_domains is list of object with 1 element
The given key does not identify an element in this collection value.
Thanks,
Ayush
This ticket includes a secure attachment. Use this link to access the attached files:
https://support-uploads.hashicorp.com/receive/?thread=7W4T-WNWM&packageCode=Bf0B4TXhNSivS27ggtARi01qtZOPS8G70KvdOGv3EaE#keyCode=0p1tSjE39dtvQE3JpsA-1T_BIBYlrTenFn70CWFlTN0