Skip to content

Latest commit

 

History

History
137 lines (107 loc) · 2.35 KB

oci_identity_auth_token.md

File metadata and controls

137 lines (107 loc) · 2.35 KB

oci_identity_auth_token

back

Index

Terraform

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

top

Example Usage

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

  # description - (required) is a type of string
  description = null
  # user_id - (required) is a type of string
  user_id = null

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

top

Variables

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

variable "user_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_identity_auth_token" "this" {
  # description - (required) is a type of string
  description = var.description
  # user_id - (required) is a type of string
  user_id = var.user_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 "id" {
  description = "returns a string"
  value       = oci_identity_auth_token.this.id
}

output "inactive_state" {
  description = "returns a string"
  value       = oci_identity_auth_token.this.inactive_state
}

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

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

output "time_expires" {
  description = "returns a string"
  value       = oci_identity_auth_token.this.time_expires
}

output "token" {
  description = "returns a string"
  value       = oci_identity_auth_token.this.token
}

output "this" {
  value = oci_identity_auth_token.this
}

top