Skip to content

Latest commit

 

History

History
114 lines (88 loc) · 1.78 KB

alicloud_image_export.md

File metadata and controls

114 lines (88 loc) · 1.78 KB

alicloud_image_export

back

Index

Terraform

terraform {
  required_providers {
    alicloud = ">= 1.120.0"
  }
}

top

Example Usage

module "alicloud_image_export" {
  source = "./modules/alicloud/r/alicloud_image_export"

  # image_id - (required) is a type of string
  image_id = null
  # oss_bucket - (required) is a type of string
  oss_bucket = null
  # oss_prefix - (optional) is a type of string
  oss_prefix = null

  timeouts = [{
    create = null
  }]
}

top

Variables

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

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

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

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

top

Resource

resource "alicloud_image_export" "this" {
  # image_id - (required) is a type of string
  image_id = var.image_id
  # oss_bucket - (required) is a type of string
  oss_bucket = var.oss_bucket
  # oss_prefix - (optional) is a type of string
  oss_prefix = var.oss_prefix

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

}

top

Outputs

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

output "this" {
  value = alicloud_image_export.this
}

top