Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surabhi #38

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
18c7048
Added output and backend file
surabhimaheshwari Nov 30, 2022
a847309
Updated output file
surabhimaheshwari Nov 30, 2022
1ed06d6
Updated existing bucket name
surabhimaheshwari Nov 30, 2022
51a4194
Added Code for backend
surabhimaheshwari Nov 30, 2022
603ab45
Updated module name
surabhimaheshwari Dec 1, 2022
44888a2
updated variables
surabhimaheshwari Dec 1, 2022
22820b8
updated variables
surabhimaheshwari Dec 1, 2022
e67df59
updated variables
surabhimaheshwari Dec 1, 2022
0d3cb75
updated variables
surabhimaheshwari Dec 1, 2022
6ca7129
Updated output file
surabhimaheshwari Dec 1, 2022
d8f830e
updated output.tf
surabhimaheshwari Dec 1, 2022
209b14c
Added secret manager provider and tfvars
surabhimaheshwari Dec 1, 2022
6edd3c6
Added variables for overriding values
surabhimaheshwari Dec 2, 2022
67471f7
update override variables
surabhimaheshwari Dec 2, 2022
c7152b7
updated override variables with local block
surabhimaheshwari Dec 2, 2022
e238aa3
updated override variable
surabhimaheshwari Dec 2, 2022
fbde05d
Added variables for data
surabhimaheshwari Dec 2, 2022
6b0eee2
changed the bucket name
Cpriyanshi07 Dec 9, 2022
6d804e1
changed the bucket name
Cpriyanshi07 Dec 9, 2022
eb3ea16
data files added
Cpriyanshi07 Dec 13, 2022
030bf24
modified eks data backend files
Cpriyanshi07 Dec 13, 2022
453d89a
renamed the data.tf to data_network.tf
Cpriyanshi07 Dec 13, 2022
b9cb330
modified: _override.tf
Cpriyanshi07 Dec 14, 2022
5d6de6c
terraform/eks/_override.tf
Cpriyanshi07 Dec 15, 2022
7d4c839
modified _override.tf
Cpriyanshi07 Dec 15, 2022
f4940fe
Update backend.tf
Cpriyanshi77 Jan 22, 2023
ecd3b16
Update backend.tf
Cpriyanshi77 Jan 22, 2023
9dc56ee
Update backend.tf
Cpriyanshi77 Jan 22, 2023
46f145a
Update backend.tf
Cpriyanshi77 Jan 22, 2023
7fc6cd6
Update backend.tf
deepakgupta97 May 9, 2023
4fe1d89
Update backend.tf
deepakgupta97 May 9, 2023
3e8fc27
Update terraform.tfvars
deepakgupta97 May 9, 2023
dea6232
Update terraform.tfvars
deepakgupta97 May 9, 2023
5d39d36
Update terraform.tfvars
deepakgupta97 May 9, 2023
9cb73d1
Update backend.tf
deepakgupta97 May 9, 2023
d210b52
Update backend.tf
deepakgupta97 May 9, 2023
337ca44
Update data_network.tf
deepakgupta97 May 9, 2023
ff2ec62
Update data_network.tf
deepakgupta97 May 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions terraform/elasticache/_override.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
locals {
security_group_ids = "${data.terraform_remote_state.network.outputs.web_sg_id}"
subnet_ids = "${data.terraform_remote_state.network.outputs.public_subnet_ids}"
}
7 changes: 7 additions & 0 deletions terraform/elasticache/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
backend "s3" {
bucket = "bp-step-tfstate"
key = "elasticache/terraform.tfstate"
region = "us-west-2"
}
}
9 changes: 9 additions & 0 deletions terraform/elasticache/data.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
data "terraform_remote_state" "network" {
backend = "s3"

config = {
bucket = "bp-step-tfstate"
key = "network/terraform.tfstate"
region = "us-west-2"
}
}
34 changes: 34 additions & 0 deletions terraform/elasticache/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
output "arn" {
value = module.elasticache.arn
description = "The Amazon Resource Name (ARN) of the created ElastiCache Replication Group."
}
output "id" {
value = module.elasticache.id
description = "The ID of the ElastiCache Replication Group."
}
output "cluster_enabled" {
value = module.elasticache.cluster_enabled
description = "Indicates if cluster mode is enabled."
}
output "configuration_endpoint_address" {
value = module.elasticache.configuration_endpoint_address
description = "The address of the replication group configuration endpoint when cluster mode is enabled."
}
output "primary_endpoint_address" {
value = module.elasticache.primary_endpoint_address
description = "The address of the endpoint for the primary node in the replication group, if the cluster mode is disabled."
}
output "reader_endpoint_address" {
value = module.elasticache.reader_endpoint_address
description = "The address of the endpoint for the reader node in the replication group, if the cluster mode is disabled."
}
output "auth_token" {
value = module.elasticache.auth_token
description = "Create a random string"
}
output "subnet_ids" {
value = data.terraform_remote_state.network.outputs.public_subnet_ids
}
output "security_group_ids" {
value = data.terraform_remote_state.network.outputs.web_sg_id
}
2 changes: 1 addition & 1 deletion terraform/elasticache/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = "elasticache-cluster"
security_group_ids = ["sg-02b42751eab13f53a", "sg-0a80c39996b1d8abc"]
subnet_ids = ["subnet-06e41801e9618a572", "subnet-020af10ef815e5c07"]
subnet_ids = ["subnet-06e41801e9618a572", "subnet-020af10ef815e5c07"]
7 changes: 7 additions & 0 deletions terraform/network_skeleton/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
backend "s3" {
bucket = "bp-step-tfstate"
key = "network/terraform.tfstate"
region = "us-west-2"
}
}
59 changes: 59 additions & 0 deletions terraform/network_skeleton/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
output "vpc_id" {
description = "The ID of the VPC"
value = module.vpc.vpc_id
}

output "pub_route_table_id" {
description = "Public route table ID"
value = module.vpc.pub_route_table_id
}

output "pvt_route_table_id" {
description = "Private Route table ID"
value = module.vpc.pvt_route_table_id
}

output "pvt_hosted_zone_id" {
description = "hosted zone id"
value = module.vpc.pvt_hosted_zone_id
}

output "pvt_subnet_ids" {
value = module.vpc.pvt_subnet_ids
}

output "public_subnet_ids" {
value = module.vpc.public_subnet_ids[0]
}

output "web_sg_id" {
value = module.vpc.web_sg_id
}

output "dns_name" {
description = "DNS of ALB"
value = module.vpc.dns_name
}

output "aws_lb_arn" {
description = "ARN of alb"
value = module.vpc.aws_lb_arn
}

output "alb_listener_arn" {
description = "ARN of alb listener"
value = module.vpc.alb_listener_arn
}

output "alb_listener1_arn" {
description = "ARN of alb listener-1"
value = module.vpc.alb_listener1_arn
}

output "route53_zone_id" {
value = module.vpc.route53_zone_id
}

output "route53_name" {
value = module.vpc.route53_name
}
4 changes: 2 additions & 2 deletions terraform/network_skeleton/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
alb_name = "t-alb"
avaialability_zones = ["us-west-2a", "us-west-2b"]
igw_name = "t-igw"
logs_bucket = "test-b01"
logs_bucket_arn = "arn:aws:s3:::test-b01"
logs_bucket = "bp-step-tfstate"
logs_bucket_arn = "arn:aws:s3:::bp-step-tfstate"
nat_name = "t-nat"
private_subnets_cidr = ["10.0.64.0/18", "10.0.128.0/17"]
pub_rt_name = "pub-t"
Expand Down
3 changes: 3 additions & 0 deletions terraform/secret_manager/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
provider "aws" {
region = "us-west-2"
}
5 changes: 5 additions & 0 deletions terraform/secret_manager/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
secret_name = "test"
secret_string = {
secretkey1 = "secretvalue1"
secretkey2 = "secretvalue2"
}