Skip to content

Latest commit

 

History

History
190 lines (154 loc) · 3.7 KB

oci_ons_subscription.md

File metadata and controls

190 lines (154 loc) · 3.7 KB

oci_ons_subscription

back

Index

Terraform

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

top

Example Usage

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

  # compartment_id - (required) is a type of string
  compartment_id = null
  # defined_tags - (optional) is a type of map of string
  defined_tags = {}
  # delivery_policy - (optional) is a type of string
  delivery_policy = null
  # endpoint - (required) is a type of string
  endpoint = null
  # freeform_tags - (optional) is a type of map of string
  freeform_tags = {}
  # protocol - (required) is a type of string
  protocol = null
  # topic_id - (required) is a type of string
  topic_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 "delivery_policy" {
  description = "(optional)"
  type        = string
  default     = null
}

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

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

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

variable "topic_id" {
  description = "(required)"
  type        = 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_ons_subscription" "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
  # delivery_policy - (optional) is a type of string
  delivery_policy = var.delivery_policy
  # endpoint - (required) is a type of string
  endpoint = var.endpoint
  # freeform_tags - (optional) is a type of map of string
  freeform_tags = var.freeform_tags
  # protocol - (required) is a type of string
  protocol = var.protocol
  # topic_id - (required) is a type of string
  topic_id = var.topic_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_time" {
  description = "returns a string"
  value       = oci_ons_subscription.this.created_time
}

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

output "delivery_policy" {
  description = "returns a string"
  value       = oci_ons_subscription.this.delivery_policy
}

output "etag" {
  description = "returns a string"
  value       = oci_ons_subscription.this.etag
}

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

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

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

output "this" {
  value = oci_ons_subscription.this
}

top