Skip to content

Commit

Permalink
📝 Fix AWS serverless integration example to use the right template UR…
Browse files Browse the repository at this point in the history
…L. (#126)

Signed-off-by: Preslav <[email protected]>
  • Loading branch information
preslavgerchev authored Aug 5, 2024
1 parent 787bb93 commit 8a2eaf6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion docs/resources/integration_aws_serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ variable "origin_aws_account" {
default = "764453172858"
}
variable "mondoo_sns_handler" {
description = "Mondoo SNS Handler"
type = string
default = "https://api.mondoo.com/AWS/SNSEventHandler"
}
variable "aws_region" {
description = "AWS Region"
type = string
Expand Down Expand Up @@ -80,12 +86,13 @@ resource "mondoo_integration_aws_serverless" "aws_serverless" {
# for single account deploys
resource "aws_cloudformation_stack" "mondoo_stack" {
name = "mondoo-stack"
template_url = "https://s3.amazonaws.com/mondoo.${data.aws_region.current.name}/mondoo-lambda-stackset-cf.json"
template_url = "https://s3.amazonaws.com/mondoo.${data.aws_region.current.name}/mondoo-root-cf.json"
capabilities = ["CAPABILITY_NAMED_IAM"]
parameters = {
MondooIntegrationMrn = mondoo_integration_aws_serverless.aws_serverless.mrn
MondooToken = mondoo_integration_aws_serverless.aws_serverless.token
OriginAwsAccount = var.origin_aws_account
MondooSnsHandler = var.mondoo_sns_handler
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ variable "origin_aws_account" {
default = "764453172858"
}

variable "mondoo_sns_handler" {
description = "Mondoo SNS Handler"
type = string
default = "https://api.mondoo.com/AWS/SNSEventHandler"
}

variable "aws_region" {
description = "AWS Region"
type = string
Expand Down Expand Up @@ -65,12 +71,13 @@ resource "mondoo_integration_aws_serverless" "aws_serverless" {
# for single account deploys
resource "aws_cloudformation_stack" "mondoo_stack" {
name = "mondoo-stack"
template_url = "https://s3.amazonaws.com/mondoo.${data.aws_region.current.name}/mondoo-lambda-stackset-cf.json"
template_url = "https://s3.amazonaws.com/mondoo.${data.aws_region.current.name}/mondoo-root-cf.json"
capabilities = ["CAPABILITY_NAMED_IAM"]
parameters = {
MondooIntegrationMrn = mondoo_integration_aws_serverless.aws_serverless.mrn
MondooToken = mondoo_integration_aws_serverless.aws_serverless.token
OriginAwsAccount = var.origin_aws_account
MondooSnsHandler = var.mondoo_sns_handler
}
}

Expand Down

0 comments on commit 8a2eaf6

Please sign in to comment.