Terraform module which creates OSS bucket and upload object to the bucket on Alibaba Cloud.
These types of resources are supported:
You can use this in your terraform template with the following steps.
-
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" }
-
Setting
access_key
andsecret_key
values through environment variables:- ALICLOUD_ACCESS_KEY
- ALICLOUD_SECRET_KEY
- ALICLOUD_REGION
Name | Version |
---|---|
terraform | >= 0.13.0 |
alicloud | >= 1.56.0 |
Name | Version |
---|---|
alicloud | >= 1.56.0 |
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 |
Name | Description |
---|---|
this_dest_file | the target object key |
this_source_file | the source file |
Created and maintained by Alibaba Cloud Terraform Team(terraform@alibabacloud.com)