Skip to content

alibabacloud-automation/terraform-alicloud-oss-object

Repository files navigation

Alicloud OSS Terraform Module On Alibaba Cloud terraform-alicloud-oss-object

Terraform module which creates OSS bucket and upload object to the bucket on Alibaba Cloud.

These types of resources are supported:


Usage

You can use this in your terraform template with the following steps.

  1. Adding a module resource to your template, e.g. main.tf

    module "oss-object" {
        source     = "terraform-alicloud-modules/oss-object/alicloud"
        bucketName = "your-bucket-name"
        sourceFile = "test.txt"
        object-key = "test-1.txt"
    }
    
  2. Setting access_key and secret_key values through environment variables:

    • ALICLOUD_ACCESS_KEY
    • ALICLOUD_SECRET_KEY
    • ALICLOUD_REGION

Requirements

Name Version
terraform >= 0.13.0
alicloud >= 1.56.0

Providers

Name Version
alicloud >= 1.56.0

Inputs

Name Description Type Default Required
Name Description Type Default Required
------ ------------- :----: :-----: :-----:
bucketName the bucket you want to create and operate string - yes
object-key object key like general file name string - yes
sourceFile local file name string - yes

Outputs

Name Description
this_dest_file the target object key
this_source_file the source file

Authors

Created and maintained by Alibaba Cloud Terraform Team([email protected])

Reference