Skip to content

Latest commit

 

History

History
221 lines (181 loc) · 4.89 KB

oci_datascience_notebook_session.md

File metadata and controls

221 lines (181 loc) · 4.89 KB

oci_datascience_notebook_session

back

Index

Terraform

terraform {
  required_providers {
    oci = ">= 4.21.0"
  }
}

top

Example Usage

module "oci_datascience_notebook_session" {
  source = "./modules/oci/r/oci_datascience_notebook_session"

  # compartment_id - (required) is a type of string
  compartment_id = null
  # defined_tags - (optional) is a type of map of string
  defined_tags = {}
  # display_name - (optional) is a type of string
  display_name = null
  # freeform_tags - (optional) is a type of map of string
  freeform_tags = {}
  # project_id - (required) is a type of string
  project_id = null
  # state - (optional) is a type of string
  state = null

  notebook_session_configuration_details = [{
    block_storage_size_in_gbs = null
    shape                     = null
    subnet_id                 = null
  }]

  timeouts = [{
    create = null
    delete = null
    update = null
  }]
}

top

Variables

variable "compartment_id" {
  description = "(required)"
  type        = string
}

variable "defined_tags" {
  description = "(optional)"
  type        = map(string)
  default     = null
}

variable "display_name" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "freeform_tags" {
  description = "(optional)"
  type        = map(string)
  default     = null
}

variable "project_id" {
  description = "(required)"
  type        = string
}

variable "state" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "notebook_session_configuration_details" {
  description = "nested block: NestingList, min items: 1, max items: 1"
  type = set(object(
    {
      block_storage_size_in_gbs = number
      shape                     = string
      subnet_id                 = string
    }
  ))
}

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      create = string
      delete = string
      update = string
    }
  ))
  default = []
}

top

Resource

resource "oci_datascience_notebook_session" "this" {
  # compartment_id - (required) is a type of string
  compartment_id = var.compartment_id
  # defined_tags - (optional) is a type of map of string
  defined_tags = var.defined_tags
  # display_name - (optional) is a type of string
  display_name = var.display_name
  # freeform_tags - (optional) is a type of map of string
  freeform_tags = var.freeform_tags
  # project_id - (required) is a type of string
  project_id = var.project_id
  # state - (optional) is a type of string
  state = var.state

  dynamic "notebook_session_configuration_details" {
    for_each = var.notebook_session_configuration_details
    content {
      # block_storage_size_in_gbs - (optional) is a type of number
      block_storage_size_in_gbs = notebook_session_configuration_details.value["block_storage_size_in_gbs"]
      # shape - (required) is a type of string
      shape = notebook_session_configuration_details.value["shape"]
      # subnet_id - (required) is a type of string
      subnet_id = notebook_session_configuration_details.value["subnet_id"]
    }
  }

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # create - (optional) is a type of string
      create = timeouts.value["create"]
      # delete - (optional) is a type of string
      delete = timeouts.value["delete"]
      # update - (optional) is a type of string
      update = timeouts.value["update"]
    }
  }

}

top

Outputs

output "created_by" {
  description = "returns a string"
  value       = oci_datascience_notebook_session.this.created_by
}

output "defined_tags" {
  description = "returns a map of string"
  value       = oci_datascience_notebook_session.this.defined_tags
}

output "display_name" {
  description = "returns a string"
  value       = oci_datascience_notebook_session.this.display_name
}

output "freeform_tags" {
  description = "returns a map of string"
  value       = oci_datascience_notebook_session.this.freeform_tags
}

output "id" {
  description = "returns a string"
  value       = oci_datascience_notebook_session.this.id
}

output "lifecycle_details" {
  description = "returns a string"
  value       = oci_datascience_notebook_session.this.lifecycle_details
}

output "notebook_session_url" {
  description = "returns a string"
  value       = oci_datascience_notebook_session.this.notebook_session_url
}

output "state" {
  description = "returns a string"
  value       = oci_datascience_notebook_session.this.state
}

output "time_created" {
  description = "returns a string"
  value       = oci_datascience_notebook_session.this.time_created
}

output "this" {
  value = oci_datascience_notebook_session.this
}

top