Difference between revisions of "Terraform resource: aws s3 object"

From wikieduonline
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{lc}}
+
 
 
  [[aws_s3_object]]
 
  [[aws_s3_object]]
 
* https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_object
 
* https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_object
  
 
== Official example ==
 
== Official example ==
 +
 +
Upload a file:
 
  resource "aws_s3_object" "object" {
 
  resource "aws_s3_object" "object" {
 
   bucket = "your_bucket_name"
 
   bucket = "your_bucket_name"
 
   key    = "new_object_key"
 
   key    = "new_object_key"
 
   source = "path/to/file"
 
   source = "path/to/file"
 
+
  # The filemd5() function is available in Terraform 0.11.12 and later
 
  # For Terraform 0.11.11 and earlier, use the md5() function and the file() function:
 
  # etag = "${md5(file("path/to/file"))}"
 
 
   [[etag]] = [[filemd5]]("path/to/file")
 
   [[etag]] = [[filemd5]]("path/to/file")
 
  }
 
  }
  
 
== See also ==
 
== See also ==
 +
* {{aws_s3_object}}
 
* {{tf s3}}
 
* {{tf s3}}
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Latest revision as of 09:39, 4 January 2024

Advertising: