-
Notifications
You must be signed in to change notification settings - Fork 30
Description
I am currently following the legaue of legends machine learning with OCI workshop and on the third task when running ./start.sh I get the folowing error on datascience.tf file. Kindly assist
│ Error: Invalid index │ │ on datascience.tf line 24, in resource "oci_datascience_notebook_session" "lol_notebook_session": │ 24: shape = data.oci_datascience_notebook_session_shapes.ds_shapes.notebook_session_shapes[0].name │ ├──────────────── │ │ data.oci_datascience_notebook_session_shapes.ds_shapes.notebook_session_shapes is empty list of object │ │ The given key does not identify an element in this collection value: the collection has no elements. ╵ ╷ │ Error: Invalid index │ │ on datascience.tf line 44, in output "ds_notebook_session_shape": │ 44: value = data.oci_datascience_notebook_session_shapes.ds_shapes.notebook_session_shapes[0].name │ ├──────────────── │ │ data.oci_datascience_notebook_session_shapes.ds_shapes.notebook_session_shapes is empty list of object │ │ The given key does not identify an element in this collection value: the collection has no elements.
And here is how my datascience.tf looks like:
`resource "oci_datascience_project" "lol_project" {
compartment_id = var.compartment_ocid
description = "League of Legends Project"
display_name = "LoL Project ${random_string.deploy_id.result}"
depends_on = [
oci_core_subnet.privatesubnet
]
}
FIXME bad hack to avoid: The specified subnet is not accessible. Select a different subnet.
resource "time_sleep" "wait_a_bit" {
create_duration = "120s"
}
resource "oci_datascience_notebook_session" "lol_notebook_session" {
compartment_id = var.compartment_ocid
project_id = oci_datascience_project.lol_project.id
display_name = "League of Legends Notebook Session"
notebook_session_config_details {
shape = data.oci_datascience_notebook_session_shapes.ds_shapes.notebook_session_shapes[0].name
subnet_id = oci_core_subnet.privatesubnet.id
}
depends_on = [
time_sleep.wait_a_bit
]
}
data "oci_datascience_notebook_session_shapes" "ds_shapes" {
compartment_id = var.compartment_ocid
filter {
name = "core_count"
values = [var.desired_number_cpus]
}
}
output "ds_notebook_session_shape" {
value = data.oci_datascience_notebook_session_shapes.ds_shapes.notebook_session_shapes[0].name
}
output "ds_notebook_session" {
value = oci_datascience_notebook_session.lol_notebook_session.notebook_session_url
}`