back
terraform {
required_providers {
alicloud = ">= 1.120.0"
}
}
top
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
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 "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
output "id" {
description = "returns a string"
value = alicloud_image_export.this.id
}
output "this" {
value = alicloud_image_export.this
}
top