-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Feature | build.env to tf 1.0.9 + configs updated to .tfvars …
…=> leverage cli 1.1.0 + deactivate cf-s3-www.binbash.com.ar"
- Loading branch information
1 parent
6bd6c1b
commit 0725927
Showing
97 changed files
with
246 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TERRAFORM_IMAGE_TAG=0.14.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#=============================# | ||
# AWS Provider Settings # | ||
#=============================# | ||
provider "aws" { | ||
region = var.region | ||
profile = var.profile | ||
shared_credentials_file = "~/.aws/${var.project}/config" | ||
} | ||
|
||
#=============================# | ||
# Backend Config (partial) # | ||
#=============================# | ||
terraform { | ||
required_version = ">= 0.14.11" | ||
|
||
required_providers { | ||
aws = "~> 3.0" | ||
} | ||
|
||
backend "s3" { | ||
key = "network/security-keys/terraform.tfstate" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
module "kms_key" { | ||
source = "github.com/binbashar/terraform-aws-kms-key.git?ref=0.10.0" | ||
|
||
enabled = true | ||
namespace = var.project | ||
stage = var.environment | ||
name = var.kms_key_name | ||
delimiter = "-" | ||
description = "KMS key for ${var.environment} Account" | ||
deletion_window_in_days = 7 | ||
enable_key_rotation = true | ||
alias = "alias/${var.project}_${var.environment}_${var.kms_key_name}_key" | ||
policy = data.aws_iam_policy_document.kms.json | ||
tags = local.tags | ||
} | ||
|
||
data "aws_iam_policy_document" "kms" { | ||
statement { | ||
sid = "Enable IAM User Permissions" | ||
effect = "Allow" | ||
actions = ["kms:*"] | ||
resources = ["*"] | ||
|
||
principals { | ||
type = "AWS" | ||
identifiers = ["arn:aws:iam::${var.network_account_id}:root"] | ||
} | ||
} | ||
|
||
statement { | ||
sid = "Enable CloudWatch Logs Service" | ||
effect = "Allow" | ||
actions = [ | ||
"kms:Encrypt*", | ||
"kms:Decrypt*", | ||
"kms:ReEncrypt*", | ||
"kms:GenerateDataKey*", | ||
"kms:Describe*" | ||
] | ||
resources = ["*"] | ||
|
||
principals { | ||
type = "Service" | ||
identifiers = ["logs.${var.region}.amazonaws.com"] | ||
} | ||
condition { | ||
test = "ArnLike" | ||
variable = "kms:EncryptionContext:aws:logs:arn" | ||
values = ["arn:aws:logs:${var.region}:${var.network_account_id}:*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
locals { | ||
tags = { | ||
Terraform = "true" | ||
Environment = var.environment | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# EC2 aws_key_pair name | ||
# | ||
output "aws_key_pair_name" { | ||
value = aws_key_pair.compute-ssh-key.key_name | ||
} | ||
|
||
# | ||
# KMS aws_kms_key outputs | ||
# | ||
output "aws_kms_key_arn" { | ||
description = "Key ARN" | ||
value = module.kms_key.key_arn | ||
} | ||
|
||
output "aws_kms_key_id" { | ||
description = "KMS Key ID" | ||
value = module.kms_key.key_id | ||
} | ||
|
||
output "aws_kms_key_alias_arn" { | ||
description = "KMS Alias ARN" | ||
value = module.kms_key.alias_arn | ||
} | ||
|
||
output "aws_kms_key_alias_name" { | ||
description = "KMS Alias name" | ||
value = module.kms_key.alias_name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "aws_key_pair" "compute-ssh-key" { | ||
key_name = var.compute_ssh_key_name | ||
public_key = var.compute_ssh_public_key | ||
} |
Oops, something went wrong.