AWS s3 bucket

From wikieduonline
Revision as of 03:32, 16 February 2022 by Welcome (talk | contribs)
Jump to navigation Jump to search
create_s3_bucket.tf



Using provider

  • Example with a predefined name: yourbucketname
provider "aws" {
  region  = "select_region" # eu-central-1
  profile = "your_profile"
}

resource "aws_s3_bucket" "yours3bucketresourcename" {
  bucket = "yourbucketname"
}


  • Example with a name assigned by terraform:
provider "aws" {
  region  = "select_regin" # eu-central-1
  profile = "your_profile"
}

resource "aws_s3_bucket" "yours3bucketname" {
}

Check name: terraform show | grep bucket


Using module

provider "aws" {
 region = "select_region"
 profile = "your_profile"
}


module "yours3bucketmodulename" {
  source = "terraform-aws-modules/s3-bucket/aws"
}

Related


See also

Advertising: