### SET VARIABLES variable "project_name" { type = string default = "hideyoshi-portifolio" } variable "aws_region" { type = string default = "sa-east-1" } variable "aws_access_key" { type = string } variable "aws_secret_key" { type = string } variable "project_domain" { type = string } variable "ssh_public_key_main" { type = string } variable "ssh_public_key_ci_cd" { type = string } variable "number_of_workers" { type = number default = 2 } ### PROVIDER provider "aws" { region = var.aws_region access_key = var.aws_access_key secret_key = var.aws_secret_key } ### RESOURCES # S3 Bucket resource "aws_s3_bucket" "default" { bucket = "${var.project_name}-bucket" } resource "aws_s3_bucket_public_access_block" "bucket_public_disabled" { bucket = aws_s3_bucket.default.id block_public_acls = true block_public_policy = false ignore_public_acls = true restrict_public_buckets = true } resource "aws_s3_bucket_policy" "default" { bucket = aws_s3_bucket.default.id policy = <