Skip to content

Commit 9d56326

Browse files
committed
refactor: remove GitHub module from main and associated locals and data
1 parent 300dadf commit 9d56326

File tree

10 files changed

+3
-329
lines changed

10 files changed

+3
-329
lines changed

.header.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,12 @@ aws ssm put-parameter --name "/rds/POSTGRES_PASSWORD" --value "value" --type "Se
5151
aws ssm put-parameter --name "/rds/POSTGRES_DB_NAME" --value "value" --type "SecureString"
5252
```
5353

54-
### GitHub Parameters
55-
56-
```sh
57-
aws ssm put-parameter --name "/github-action/GITHUB_ORG" --value "value" --type "SecureString"
58-
aws ssm put-parameter --name "/github-action/GITHUB_REPO" --value "value" --type "SecureString"
59-
aws ssm put-parameter --name "/github-action/GITHUB_TOKEN" --value "value" --type "SecureString"
60-
```
61-
6254
## Verifying Parameter Storage
6355

6456
After adding the parameters, you can verify their storage in AWS Systems Manager Parameter Store using the following command:
6557

6658
```sh
67-
aws ssm get-parameters --names "/rds/POSTGRES_USERNAME" "/rds/POSTGRES_PASSWORD" "/rds/POSTGRES_DB_NAME" "/github-action/GITHUB_ORG" "/github-action/GITHUB_REPO" "/github-action/GITHUB_TOKEN" --with-decryption
59+
aws ssm get-parameters --names "/rds/POSTGRES_USERNAME" "/rds/POSTGRES_PASSWORD" "/rds/POSTGRES_DB_NAME" --with-decryption
6860
```
6961

7062
This command will display the values of the stored parameters, ensuring they have been added correctly.

README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,12 @@ aws ssm put-parameter --name "/rds/POSTGRES_PASSWORD" --value "value" --type "Se
5151
aws ssm put-parameter --name "/rds/POSTGRES_DB_NAME" --value "value" --type "SecureString"
5252
```
5353

54-
### GitHub Parameters
55-
56-
```sh
57-
aws ssm put-parameter --name "/github-action/GITHUB_ORG" --value "value" --type "SecureString"
58-
aws ssm put-parameter --name "/github-action/GITHUB_REPO" --value "value" --type "SecureString"
59-
aws ssm put-parameter --name "/github-action/GITHUB_TOKEN" --value "value" --type "SecureString"
60-
```
61-
6254
## Verifying Parameter Storage
6355

6456
After adding the parameters, you can verify their storage in AWS Systems Manager Parameter Store using the following command:
6557

6658
```sh
67-
aws ssm get-parameters --names "/rds/POSTGRES_USERNAME" "/rds/POSTGRES_PASSWORD" "/rds/POSTGRES_DB_NAME" "/github-action/GITHUB_ORG" "/github-action/GITHUB_REPO" "/github-action/GITHUB_TOKEN" --with-decryption
59+
aws ssm get-parameters --names "/rds/POSTGRES_USERNAME" "/rds/POSTGRES_PASSWORD" "/rds/POSTGRES_DB_NAME" --with-decryption
6860
```
6961

7062
This command will display the values of the stored parameters, ensuring they have been added correctly.
@@ -88,7 +80,6 @@ This command will display the values of the stored parameters, ensuring they hav
8880
| <a name="module_ecs_exec_role"></a> [ecs\_exec\_role](#module\_ecs\_exec\_role) | ./modules/iam | n/a |
8981
| <a name="module_ecs_kong"></a> [ecs\_kong](#module\_ecs\_kong) | infraspecdev/ecs-deployment/aws | ~> 2.0.0 |
9082
| <a name="module_ecs_task_security_group"></a> [ecs\_task\_security\_group](#module\_ecs\_task\_security\_group) | terraform-aws-modules/security-group/aws | ~> 5.1.2 |
91-
| <a name="module_github_runner"></a> [github\_runner](#module\_github\_runner) | ./modules/github-runner | n/a |
9283
| <a name="module_internal_alb_kong"></a> [internal\_alb\_kong](#module\_internal\_alb\_kong) | infraspecdev/ecs-deployment/aws//modules/alb | ~> 2.0.0 |
9384
| <a name="module_internal_alb_security_group"></a> [internal\_alb\_security\_group](#module\_internal\_alb\_security\_group) | terraform-aws-modules/security-group/aws | ~> 5.1.2 |
9485
| <a name="module_kong_internal_dns_record"></a> [kong\_internal\_dns\_record](#module\_kong\_internal\_dns\_record) | ./modules/route-53-record | n/a |
@@ -102,7 +93,6 @@ This command will display the values of the stored parameters, ensuring they hav
10293
| Name | Type |
10394
|------|------|
10495
| [aws_ecs_cluster.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecs_cluster) | data source |
105-
| [aws_ssm_parameter.github](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
10696
| [aws_ssm_parameter.rds](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
10797
| [aws_vpc.vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source |
10898

@@ -138,4 +128,4 @@ This command will display the values of the stored parameters, ensuring they hav
138128

139129
## Outputs
140130

141-
No outputs.
131+
No outputs.

locals.tf

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ locals {
66
"POSTGRES_PASSWORD",
77
"POSTGRES_DB_NAME"
88
]
9-
github = [
10-
"GITHUB_ORG",
11-
"GITHUB_REPO",
12-
"GITHUB_TOKEN"
13-
]
149
}
1510

1611
rds = {
@@ -76,12 +71,6 @@ locals {
7671
}
7772
}
7873

79-
github = {
80-
org = data.aws_ssm_parameter.github["GITHUB_ORG"].value
81-
repo = data.aws_ssm_parameter.github["GITHUB_REPO"].value
82-
token = data.aws_ssm_parameter.github["GITHUB_TOKEN"].value
83-
}
84-
8574
default_tags = {
8675
ManagedBy = "Terraform"
8776
}

main.tf

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ data "aws_ssm_parameter" "rds" {
88
with_decryption = true
99
}
1010

11-
data "aws_ssm_parameter" "github" {
12-
for_each = toset(local.ssm_parameters.github)
13-
name = "/github-action/${each.value}"
14-
with_decryption = true
15-
}
16-
1711
################################################################################
1812
# Postgres Security Group
1913
################################################################################
@@ -384,17 +378,3 @@ module "kong_internal_dns_record" {
384378
alb_dns_name = module.internal_alb_kong.dns_name
385379
alb_zone_id = module.ecs_kong.alb_zone_id
386380
}
387-
388-
################################################################################
389-
# Self-hosted Github Runner
390-
################################################################################
391-
392-
module "github_runner" {
393-
source = "./modules/github-runner"
394-
395-
vpc_id = var.vpc_id
396-
private_subnet_id = var.private_subnet_ids[0]
397-
github_org = local.github.org
398-
github_repo = local.github.repo
399-
github_token = local.github.token
400-
}

modules/github-runner/.header.md

Whitespace-only changes.

modules/github-runner/README.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

modules/github-runner/main.tf

Lines changed: 0 additions & 55 deletions
This file was deleted.

modules/github-runner/outputs.tf

Whitespace-only changes.

modules/github-runner/scripts/self-hosted-runner.sh

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)