Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5c5e127
round 3 baby
denniwang Sep 26, 2025
93e0c22
chore: auto-format terraform and update documentation
github-actions[bot] Sep 26, 2025
7066689
added infisical as a provider in aws
denniwang Sep 26, 2025
56b7f4a
chore: auto-format terraform and update documentation
github-actions[bot] Sep 26, 2025
05a14cc
added missing vars to aws folder
denniwang Sep 26, 2025
fcb5aff
chore: auto-format terraform and update documentation
github-actions[bot] Sep 26, 2025
97f02cc
root file for shared variables
denniwang Sep 28, 2025
85cd8ba
added version to root
denniwang Sep 28, 2025
a8251b3
chore: auto-format terraform and update documentation
github-actions[bot] Sep 28, 2025
dc0100a
no more root
denniwang Sep 28, 2025
afdb268
added githug repo resource in aws
denniwang Sep 28, 2025
8041275
chore: auto-format terraform and update documentation
github-actions[bot] Sep 28, 2025
27691e6
added github as resource
denniwang Sep 28, 2025
ed38dc4
chore: auto-format terraform and update documentation
github-actions[bot] Sep 28, 2025
447c866
x
denniwang Sep 28, 2025
c36a45d
chore: auto-format terraform and update documentation
github-actions[bot] Sep 28, 2025
36a4161
try this
denniwang Sep 28, 2025
f8eb3d4
chore: auto-format terraform and update documentation
github-actions[bot] Sep 28, 2025
25a5567
no output
denniwang Sep 28, 2025
514cb70
Merge branch 'dw/feature/aws-rds' of https://github.com/Code-4-Commun…
denniwang Sep 29, 2025
8bcbdd1
formatting
denniwang Oct 1, 2025
2befe7c
Merge branch 'main' into dw/feature/aws-rds
denniwang Oct 5, 2025
fd16555
Merge branch 'main' into dw/feature/aws-rds
nourshoreibah Oct 8, 2025
3ecd5a5
Merge branch 'main' into dw/feature/aws-rds
denniwang Oct 8, 2025
1fc1cf5
test variable
denniwang Oct 8, 2025
14319b0
chore: auto-format terraform and update documentation
github-actions[bot] Oct 8, 2025
c474027
Update infrastructure/github/variables.tf
denniwang Oct 9, 2025
17e2731
chore: auto-format terraform and update documentation
github-actions[bot] Oct 9, 2025
ec4b979
trigger ci
nourshoreibah Oct 9, 2025
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
44 changes: 44 additions & 0 deletions infrastructure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Terraform Module

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <a name="requirement_github"></a> [github](#requirement\_github) | ~> 6.0 |
| <a name="requirement_infisical"></a> [infisical](#requirement\_infisical) | ~> 0.8 |

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_aws"></a> [aws](#module\_aws) | ./aws | n/a |
| <a name="module_github"></a> [github](#module\_github) | ./github | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | AWS region | `string` | `"us-east-1"` | no |
| <a name="input_github_token"></a> [github\_token](#input\_github\_token) | GitHub personal access token | `string` | n/a | yes |
| <a name="input_infisical_client_id"></a> [infisical\_client\_id](#input\_infisical\_client\_id) | Infisical client ID | `string` | n/a | yes |
| <a name="input_infisical_client_secret"></a> [infisical\_client\_secret](#input\_infisical\_client\_secret) | Infisical client secret | `string` | n/a | yes |
| <a name="input_infisical_workspace_id"></a> [infisical\_workspace\_id](#input\_infisical\_workspace\_id) | Infisical workspace ID | `string` | `"d1ee8b80-118c-4daf-ae84-31da43261b76"` | no |
| <a name="input_repository_collaborators"></a> [repository\_collaborators](#input\_repository\_collaborators) | List of GitHub users to add as collaborators | <pre>list(object({<br> username = string<br> permission = string<br> }))</pre> | `[]` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_github_repository_name"></a> [github\_repository\_name](#output\_github\_repository\_name) | GitHub repository name |
| <a name="output_rds_endpoint"></a> [rds\_endpoint](#output\_rds\_endpoint) | RDS instance endpoint |
<!-- END_TF_DOCS -->
1 change: 1 addition & 0 deletions infrastructure/aws/.terraform-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.13.0
39 changes: 39 additions & 0 deletions infrastructure/aws/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Terraform Module

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | 6.14.1 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 6.14.1 |
| <a name="provider_infisical"></a> [infisical](#provider\_infisical) | n/a |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_db_instance.branch_rds](https://registry.terraform.io/providers/hashicorp/aws/6.14.1/docs/resources/db_instance) | resource |
| [infisical_secrets.rds_folder](https://registry.terraform.io/providers/infisical/infisical/latest/docs/data-sources/secrets) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_infisical_client_id"></a> [infisical\_client\_id](#input\_infisical\_client\_id) | n/a | `string` | n/a | yes |
| <a name="input_infisical_client_secret"></a> [infisical\_client\_secret](#input\_infisical\_client\_secret) | n/a | `string` | n/a | yes |
| <a name="input_infisical_workspace_id"></a> [infisical\_workspace\_id](#input\_infisical\_workspace\_id) | n/a | `string` | `"d1ee8b80-118c-4daf-ae84-31da43261b76"` | no |

## Outputs

No outputs.
<!-- END_TF_DOCS -->
9 changes: 9 additions & 0 deletions infrastructure/aws/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "s3" {
bucket = "c4c-neu-terraform-state-files"
key = "aws/terraform.tfstate"
region = "us-east-2"
dynamodb_table = "terraform-state-lock"
encrypt = true
}
}
11 changes: 11 additions & 0 deletions infrastructure/aws/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "aws_db_instance" "branch_rds" {
allocated_storage = 10
db_name = "branch_rds"
engine = "postgres"
engine_version = "18.0"
instance_class = "db.t3.micro"
username = data.infisical_secrets.rds_folder.secrets["username"].value
password = data.infisical_secrets.rds_folder.secrets["password"].value
parameter_group_name = "default.postgres18.0"
skip_final_snapshot = true
}
25 changes: 25 additions & 0 deletions infrastructure/aws/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "6.14.1"
}
infisical = {
source = "infisical/infisical"
}
}
}

provider "aws" {
region = "us-east-2"
}

provider "infisical" {
host = "https://app.infisical.com"
auth = {
universal = {
client_id = var.infisical_client_id
client_secret = var.infisical_client_secret
}
}
}
13 changes: 13 additions & 0 deletions infrastructure/aws/secrets.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
variable "infisical_client_id" {
type = string
}

variable "infisical_client_secret" {
type = string
}

data "infisical_secrets" "rds_folder" {
env_slug = "dev"
workspace_id = var.infisical_workspace_id
folder_path = "/aws/rds"
}
4 changes: 4 additions & 0 deletions infrastructure/aws/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
variable "infisical_workspace_id" {
type = string
default = "d1ee8b80-118c-4daf-ae84-31da43261b76"
}
1 change: 1 addition & 0 deletions infrastructure/github/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ variable "infisical_workspace_id" {
type = string
default = "d1ee8b80-118c-4daf-ae84-31da43261b76"
}

2 changes: 1 addition & 1 deletion infrastructure/github/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ variable "repository_collaborators" {
# permission = "push"
# }
]
}
}