Skip to content

Commit

Permalink
Added s3 bucket module
Browse files Browse the repository at this point in the history
  • Loading branch information
ShamserulAwsGeek committed Mar 23, 2024
1 parent 30450e2 commit 18b7b26
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright (c) HashiCorp, Inc.

terraform {
required_providers {
aws = {
Expand All @@ -18,8 +16,7 @@ resource "aws_vpc" "hashicat" {
enable_dns_hostnames = true

tags = {
name = "${var.prefix}-vpc-${var.region}"
environment = "Production"
name = "${var.prefix}-vpc-${var.region}"
}
}

Expand Down Expand Up @@ -128,7 +125,9 @@ resource "aws_instance" "hashicat" {
vpc_security_group_ids = [aws_security_group.hashicat.id]

tags = {
Name = "${var.prefix}-hashicat-instance"
Name = "${var.prefix}-hashicat-instance"
Environment = "prod"
Department = "Hashicat Social"
}
}

Expand Down Expand Up @@ -198,3 +197,9 @@ resource "aws_key_pair" "hashicat" {
key_name = local.private_key_filename
public_key = tls_private_key.hashicat.public_key_openssh
}

module "s3-bucket" {
source = "cloudposse/s3-bucket/aws"
version = "3.1.0"
s3_object_ownership = "BucketOwnerEnforced"
}

0 comments on commit 18b7b26

Please sign in to comment.