Skip to content

Latest commit

 

History

History
118 lines (92 loc) · 2.01 KB

oci_blockchain_peers.md

File metadata and controls

118 lines (92 loc) · 2.01 KB

oci_blockchain_peers

back

Index

Terraform

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

top

Example Usage

module "oci_blockchain_peers" {
  source = "./modules/oci/d/oci_blockchain_peers"

  # blockchain_platform_id - (required) is a type of string
  blockchain_platform_id = null
  # display_name - (optional) is a type of string
  display_name = null

  filter = [{
    name   = null
    regex  = null
    values = []
  }]
}

top

Variables

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

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

variable "filter" {
  description = "nested block: NestingSet, min items: 0, max items: 0"
  type = set(object(
    {
      name   = string
      regex  = bool
      values = list(string)
    }
  ))
  default = []
}

top

Datasource

data "oci_blockchain_peers" "this" {
  # blockchain_platform_id - (required) is a type of string
  blockchain_platform_id = var.blockchain_platform_id
  # display_name - (optional) is a type of string
  display_name = var.display_name

  dynamic "filter" {
    for_each = var.filter
    content {
      # name - (required) is a type of string
      name = filter.value["name"]
      # regex - (optional) is a type of bool
      regex = filter.value["regex"]
      # values - (required) is a type of list of string
      values = filter.value["values"]
    }
  }

}

top

Outputs

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

output "peer_collection" {
  description = "returns a list of object"
  value       = data.oci_blockchain_peers.this.peer_collection
}

output "this" {
  value = oci_blockchain_peers.this
}

top