In this article, we will see How to create S3 bucket in AWS using Terraform step by step.
1. You must have configured the aws profile using AWS access key and secet key as shown in the video.
2. Create .tf file
Script to Create S3 bucket usingin AWS using Terraform:
#Terraform Block terraform { required_version = "1.5.7" required_providers { aws = { source = "hashicorp/aws" version = "~> 5.0" } } } provider "aws" { region = "us-east-1" profile = "default" } resource "aws_s3_bucket" "s3bucket" { bucket = "r2admin1234" tags = { Name = "r2ssss" Environment = "Dev" } }