Skip to Main Content

Deploying Infrastructure Using Terraform

User_F86X3Oct 2 2022 — edited Oct 2 2022

I'm trying to follow along with the following lab: Deploying Infrastructure using Terraform

I updated terraform.tfvars as instructed. (My tenancy is in us-phoenix-1.)
terraform init ran successfully.
terraform plan results in this:
data.oci_identity_tenancy.tenant_details: Reading...
data.oci_core_images.InstanceImageOCID: Reading...
data.oci_identity_availability_domains.ADs: Reading...
data.oci_identity_tenancy.tenant_details: Read complete after 0s
data.oci_identity_availability_domains.ADs: Read complete after 0s
data.oci_core_images.InstanceImageOCID: Read complete after 0s

│ Error: Attempt to index null value

│ on compute.tf line 8, in resource "oci_core_instance" "compute_instance":
│ 8: availability_domain = var.availablity_domain_name == "" ? data.oci_identity_availability_domains.ADs.availability_domains[0]["name"] : var.availablity_domain_name
│ ├────────────────
│ │ data.oci_identity_availability_domains.ADs.availability_domains is null

│ This value is null, so it does not have any indices.


│ Error: Attempt to index null value

│ on compute.tf line 32, in resource "oci_core_instance" "compute_instance":
│ 32: source_id = lookup(data.oci_core_images.InstanceImageOCID.images[0], "id")
│ ├────────────────
│ │ data.oci_core_images.InstanceImageOCID.images is null

│ This value is null, so it does not have any indices.


│ Error: Null value found in list

│ with data.oci_identity_regions.home_region,
│ on datasources.tf line 27, in data "oci_identity_regions" "home_region":
│ 27: data "oci_identity_regions" "home_region" {

│ Null values are not allowed for this attribute value.

Comments
Post Details
Added on Oct 2 2022
1 comment
73 views