Skip to content

Latest commit

 

History

History
172 lines (138 loc) · 3.09 KB

oci_blockchain_peer.md

File metadata and controls

172 lines (138 loc) · 3.09 KB

oci_blockchain_peer

back

Index

Terraform

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

top

Example Usage

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

  # ad - (required) is a type of string
  ad = null
  # alias - (optional) is a type of string
  alias = null
  # blockchain_platform_id - (required) is a type of string
  blockchain_platform_id = null
  # role - (required) is a type of string
  role = null

  ocpu_allocation_param = [{
    ocpu_allocation_number = null
  }]

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

top

Variables

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

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

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

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

variable "ocpu_allocation_param" {
  description = "nested block: NestingList, min items: 1, max items: 1"
  type = set(object(
    {
      ocpu_allocation_number = number
    }
  ))
}

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_blockchain_peer" "this" {
  # ad - (required) is a type of string
  ad = var.ad
  # alias - (optional) is a type of string
  alias = var.alias
  # blockchain_platform_id - (required) is a type of string
  blockchain_platform_id = var.blockchain_platform_id
  # role - (required) is a type of string
  role = var.role

  dynamic "ocpu_allocation_param" {
    for_each = var.ocpu_allocation_param
    content {
      # ocpu_allocation_number - (required) is a type of number
      ocpu_allocation_number = ocpu_allocation_param.value["ocpu_allocation_number"]
    }
  }

  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 "alias" {
  description = "returns a string"
  value       = oci_blockchain_peer.this.alias
}

output "host" {
  description = "returns a string"
  value       = oci_blockchain_peer.this.host
}

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

output "peer_key" {
  description = "returns a string"
  value       = oci_blockchain_peer.this.peer_key
}

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

output "this" {
  value = oci_blockchain_peer.this
}

top