-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
120 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module certTable { | ||
source ="./modules/dynamodb" | ||
access_key = var.access_key | ||
secret_key = var.secret_key | ||
region = var.region | ||
table_name = var.table_name | ||
table_main_key = var.table_main_key | ||
|
||
} | ||
|
||
module certLambda { | ||
source = "./modules/lambda" | ||
access_key = var.access_key | ||
secret_key = var.secret_key | ||
region = var.region | ||
lambda_name = var.lambda_name | ||
zip_file = var.zip_file | ||
lambda_iam_resources = [module.certTable.arn] | ||
env_vars = var.env_vars | ||
lambda_iam_actions = var.lambda_iam_actions | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
output "dynamodbTable"{ | ||
value = module.certTable.arn | ||
} | ||
|
||
output "Lambda"{ | ||
value = module.certTable.arn | ||
} |
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,28 @@ | ||
{ | ||
"requester": "me", | ||
"caCert": { | ||
"serial": 1, | ||
"validForYears": 10, | ||
"subject": { | ||
"country": "PL", | ||
"organization": "ChmurPol", | ||
"organizationalUnit": "dzial certow", | ||
"locality": "WD", | ||
"commonName": "certhost jp2" | ||
} | ||
}, | ||
"cert": { | ||
"serial": 1, | ||
"validForYears": 1, | ||
"dnsNames": [ | ||
"yellowhost.jp2" | ||
], | ||
"subject": { | ||
"country": "PL", | ||
"organization": "ChmurPol", | ||
"organizationalUnit": "dzial certow", | ||
"locality": "WD", | ||
"commonName": "creampie.jp2" | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,58 @@ | ||
variable access_key { | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
variable secret_key { | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
variable region { | ||
type = string | ||
default = "eu-central-1" | ||
} | ||
|
||
variable table_name { | ||
type = string | ||
default = "certificates" | ||
} | ||
|
||
variable table_main_key { | ||
type = object({ | ||
name = string | ||
type = string | ||
}) | ||
default = { | ||
name = "Name" | ||
type = "S" | ||
} | ||
} | ||
|
||
variable lambda_name { | ||
type = string | ||
default = "CertLambda" | ||
} | ||
|
||
variable env_vars { | ||
type = map(string) | ||
default = { | ||
ENVIROMENT = "LAMBDA" | ||
TABLE_NAME = "certificates" | ||
DB_REGION = "eu-central-1" | ||
} | ||
} | ||
|
||
variable lambda_iam_actions { | ||
type = list(string) | ||
default = ["dynamodb:TagResource", | ||
"dynamodb:PutItem", | ||
"dynamodb:DescribeTable", | ||
"dynamodb:DeleteItem", | ||
"dynamodb:UpdateItem"] | ||
} | ||
|
||
variable zip_file { | ||
type = string | ||
default = "bootstrap.zip" | ||
} |