Skip to content

Latest commit

 

History

History
107 lines (83 loc) · 1.86 KB

alicloud_oss_bucket_objects.md

File metadata and controls

107 lines (83 loc) · 1.86 KB

alicloud_oss_bucket_objects

back

Index

Terraform

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

top

Example Usage

module "alicloud_oss_bucket_objects" {
  source = "./modules/alicloud/d/alicloud_oss_bucket_objects"

  # bucket_name - (required) is a type of string
  bucket_name = null
  # key_prefix - (optional) is a type of string
  key_prefix = null
  # key_regex - (optional) is a type of string
  key_regex = null
  # output_file - (optional) is a type of string
  output_file = null
}

top

Variables

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

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

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

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

top

Datasource

data "alicloud_oss_bucket_objects" "this" {
  # bucket_name - (required) is a type of string
  bucket_name = var.bucket_name
  # key_prefix - (optional) is a type of string
  key_prefix = var.key_prefix
  # key_regex - (optional) is a type of string
  key_regex = var.key_regex
  # output_file - (optional) is a type of string
  output_file = var.output_file
}

top

Outputs

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

output "objects" {
  description = "returns a list of object"
  value       = data.alicloud_oss_bucket_objects.this.objects
}

output "this" {
  value = alicloud_oss_bucket_objects.this
}

top