How to create a folder in S3 bucket using terraform

0 votes

Hi Guys,

I want to create one folder using terraform. Can anyone help me how can I create one folder in s3 bucket?

Jun 11, 2020 in Terraform by akhtar
• 38,260 points
10,959 views

1 answer to this question.

+1 vote

Hi@akhtar,

You can use aws_s3_bucket_object resource to create one folder in s3. I have attached one example below.

resource "aws_s3_bucket_object" "folder1" {
    bucket = "aws_s3_bucket"
    acl    = "public"
    key    = "Folder1/"
    source = "/dev/null"
}

I hope this will help.

answered Jun 11, 2020 by MD
• 95,460 points

Related Questions In Terraform

0 votes
1 answer

How to create one s3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket resources to create ...READ MORE

answered Jun 12, 2020 in Terraform by MD
• 95,460 points
3,906 views
0 votes
1 answer

How to create a namespace in minikube using Terraform?

Hi@akhtar, You can use kubernetes_namespace resource. It is used ...READ MORE

answered Jun 30, 2020 in Terraform by MD
• 95,460 points
1,695 views
0 votes
1 answer

How to create a rds snapshot from running rds instance in AWS using terraform?

Hi, I think you can use aws_db_instance resource to ...READ MORE

answered Jul 20, 2020 in Terraform by MD
• 95,460 points
2,663 views
0 votes
1 answer

How to create a VPC in AWS using Terraform?

Hi@akhtar, You can find the script in the ...READ MORE

answered Jul 21, 2020 in Terraform by MD
• 95,460 points
1,342 views
0 votes
1 answer
0 votes
1 answer

How to create a folder inside S3 Bucket using Terraform code?

Hi@akhtar, You can create a folder at the ...READ MORE

answered Jul 23, 2020 in Terraform by MD
• 95,460 points
2,951 views
0 votes
1 answer

How to create one S3 bucket in AWS using Terraform?

Hi@akhtar, You need to set aws provider name ...READ MORE

answered Jul 23, 2020 in Terraform by MD
• 95,460 points
1,401 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP