Difference between revisions of "AWS s3 bucket"

From wikieduonline
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
  create_s3_bucket[[.tf]]
 
  create_s3_bucket[[.tf]]
 
 
 
 
  
 
== Using provider ==
 
== Using provider ==
Line 42: Line 38:
  
 
== Related ==
 
== Related ==
* [[alias]]
+
* [[Terraform multiple providers]]: <code>[[alias]]</code>
 
* https://registry.terraform.io/modules/terraform-aws-modules/s3-bucket/aws/latest
 
* https://registry.terraform.io/modules/terraform-aws-modules/s3-bucket/aws/latest
 
  
 
== See also ==
 
== See also ==
 
* {{terraform examples}}
 
* {{terraform examples}}
 +
* {{aws s3}}
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Latest revision as of 20:09, 26 September 2022

create_s3_bucket.tf

Using provider[edit]

  • 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[edit]

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


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

Related[edit]

See also[edit]

Advertising: