File tree Expand file tree Collapse file tree 9 files changed +70
-15
lines changed Expand file tree Collapse file tree 9 files changed +70
-15
lines changed Original file line number Diff line number Diff line change 11# used for testing
2- * .tfvars
32
43# Compiled files
54* .tfstate
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ You can use this in your terraform template with the following steps.
5151
5252Authors
5353-------
54- Created and maintained by He Guimin(@xiaozhu36, heguimin36@163 .com)
54+ Created and maintained by Alibaba Cloud Terraform Team(terraform@alibabacloud .com)
5555
5656Reference
5757---------
Original file line number Diff line number Diff line change 1+ # Complete terraform-alicloud-oss-object
2+ =====================================================================
3+
4+ Terraform module which creates OSS bucket and upload object to the bucket on Alibaba Cloud.
5+
6+ These types of resources are supported:
7+
8+ * [ OSS] ( https://www.terraform.io/docs/providers/alicloud/d/oss_bucket_objects.html )
9+
10+ ## Usage
11+
12+ To run this example you need to execute:
13+
14+ ``` bash
15+ $ terraform init
16+ $ terraform plan
17+ $ terraform apply
18+ ```
19+
20+ Note that this example may create resources which cost money. Run ` terraform destroy ` when you don't need these resources.
21+
22+ This example provides the tf variables file in the folder ` tfvars ` . If you want to create or update this example,
23+ you can run this example as the following commands:
24+ ``` bash
25+ $ terraform plan -var-file=tfvars/01-update.tfvars
26+ $ terraform apply -var-file=tfvars/01-update.tfvars
27+ ```
28+
29+ Also, you can add more variables files in the folder ` tfvars ` .
30+
31+ <!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
32+ ## Requirements
33+
34+ | Name | Version |
35+ | ------| ---------|
36+ | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= 0.12.0 |
37+ | <a name =" requirement_alicloud " ></a > [ alicloud] ( #requirement\_ alicloud ) | >= 1.56.0 |
Original file line number Diff line number Diff line change 1+ // Upload file without encryption
2+ module "oss-object" {
3+ source = " ../.."
4+ bucketName = var. bucketName
5+ sourceFile = var. sourceFile
6+ object-key = var. object-key
7+ }
File renamed without changes.
Original file line number Diff line number Diff line change 1+ oss-object
Original file line number Diff line number Diff line change 1+ # #############################################################
2+ # variables for alicloud_oss_bucket_object
3+ # #############################################################
4+ bucketName = " bucket-terraform-20220111"
5+ sourceFile = " test2.txt"
6+ object-key = " test-2.txt"
7+
Original file line number Diff line number Diff line change 1+ variable "bucketName" {
2+ description = " The name of the bucket to put the file in."
3+ type = " string"
4+ default = " bucket-terraform-20220110"
5+ }
6+
7+ variable "object-key" {
8+ description = " The name of the object once it is in the bucket."
9+ type = " string"
10+ default = " test-1.txt"
11+ }
12+
13+ variable "sourceFile" {
14+ description = " The path to the source file being uploaded to the bucket."
15+ type = " string"
16+ default = " test.txt"
17+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments