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_keyandsecret_keyvalues through environment variables:- ALICLOUD_ACCESS_KEY
- ALICLOUD_SECRET_KEY
- ALICLOUD_REGION
| 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 He Guimin(@xiaozhu36, [email protected])