Skip to content

Commit

Permalink
Ripping off the bandaid - we're going live
Browse files Browse the repository at this point in the history
  • Loading branch information
dvargas92495 committed Dec 23, 2023
1 parent b28612f commit 56daad0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 149 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/lambdas.yaml

This file was deleted.

115 changes: 0 additions & 115 deletions aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -463,118 +463,3 @@ resource "aws_lambda_permission" "sns_lambda" {
principal = "sns.amazonaws.com"
source_arn = aws_sns_topic.cloudformation_topic.arn
}

module "roamjs_lambda" {
source = "dvargas92495/lambda/roamjs"
providers = {
aws = aws
github = github
}

name = "service-static-site"
lambdas = [
{
path = "deploy-website",
method = "post"
},
{
path = "launch-website",
method = "post"
},
{
path = "shutdown-website",
method = "post"
},
{
path = "update-website",
method = "post"
},
{
path = "website-status",
method = "get"
},
{
path = "website-variables",
method = "get"
},
{
path = "themes",
method = "get"
},
{
path = "website-records",
method = "get"
},
{
path = "website-records",
method = "post"
},
{
path = "website-records",
method = "put"
},
{
path = "website-records",
method = "delete"
},
{
path = "website-redirects",
method = "post"
},
{
path = "website-sharing",
method = "post"
},
]
aws_access_token = var.aws_access_token
aws_secret_token = var.aws_secret_token
github_token = var.github_token
developer_token = var.developer_token
}

provider "github" {
owner = "dvargas92495"
token = var.github_token
}

resource "github_actions_secret" "cloudfront_secret" {
repository = "roamjs-static-site"
secret_name = "CLOUDFRONT_SECRET"
plaintext_value = var.cloudfront_secret
}

resource "github_actions_secret" "cloudformation_role_arn_secret" {
repository = "roamjs-static-site"
secret_name = "CLOUDFORMATION_ROLE_ARN"
plaintext_value = aws_iam_role.cf_role.arn
}

resource "github_actions_secret" "origin_lambda_arn_secret" {
repository = "roamjs-static-site"
secret_name = "ORIGIN_LAMBDA_ARN"
plaintext_value = aws_lambda_function.origin_request.qualified_arn
}

resource "github_actions_secret" "cloudwatch_role_arn" {
repository = "roamjs-static-site"
secret_name = "CLOUDWATCH_ROLE_ARN"
plaintext_value = aws_iam_role.cloudwatch.arn
}

resource "github_actions_secret" "sns_topic_arn_secret" {
repository = "roamjs-static-site"
secret_name = "SNS_TOPIC_ARN"
plaintext_value = aws_sns_topic.cloudformation_topic.arn
}

resource "github_actions_secret" "s3_website_endpoint_secret" {
repository = "roamjs-static-site"
secret_name = "S3_WEBSITE_ENDPOINT"
plaintext_value = aws_s3_bucket.main.website_endpoint
}

resource "github_actions_secret" "roamjs_zone_id_secret" {
repository = "roamjs-static-site"
secret_name = "ROAMJS_ZONE_ID"
plaintext_value = data.aws_route53_zone.roamjs.zone_id
}

0 comments on commit 56daad0

Please sign in to comment.