-
Notifications
You must be signed in to change notification settings - Fork 166
feat: add ability to handle default bus #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
684447a
846c9cf
d07999b
fdbb385
49627d0
eecb453
70b3407
16c54c3
b41fff2
6c528a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
--- | ||
repos: | ||
- repo: git://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.48.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
terraform { | ||
required_version = ">= 0.14.0" | ||
|
||
required_providers { | ||
aws = ">= 3.19" | ||
random = ">= 0" | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "ap-southeast-1" | ||
|
||
|
@@ -66,7 +57,7 @@ resource "random_pet" "this" { | |
|
||
module "api_gateway" { | ||
source = "terraform-aws-modules/apigateway-v2/aws" | ||
version = "0.14.0" | ||
version = "~> 0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We normally use range for the major version to make it to use a later version without updating the examples every time. |
||
|
||
name = "${random_pet.this.id}-http" | ||
description = "My ${random_pet.this.id} HTTP API Gateway" | ||
|
@@ -95,16 +86,14 @@ module "api_gateway" { | |
|
||
module "apigateway_put_events_to_eventbridge_role" { | ||
source = "terraform-aws-modules/iam/aws//modules/iam-assumable-role" | ||
version = "3.13.0" | ||
version = "~> 3" | ||
|
||
create_role = true | ||
|
||
role_name = "apigateway-put-events-to-eventbridge" | ||
role_requires_mfa = false | ||
|
||
trusted_role_services = [ | ||
"apigateway.amazonaws.com" | ||
] | ||
trusted_role_services = ["apigateway.amazonaws.com"] | ||
|
||
custom_role_policy_arns = [ | ||
module.apigateway_put_events_to_eventbridge_policy.arn | ||
|
@@ -113,10 +102,9 @@ module "apigateway_put_events_to_eventbridge_role" { | |
|
||
module "apigateway_put_events_to_eventbridge_policy" { | ||
source = "terraform-aws-modules/iam/aws//modules/iam-policy" | ||
version = "3.13.0" | ||
version = "~> 3" | ||
|
||
name = "apigateway-put-events-to-eventbridge" | ||
path = "/" | ||
description = "Allow PutEvents to EventBridge" | ||
|
||
policy = data.aws_iam_policy_document.apigateway_put_events_to_eventbridge_policy.json | ||
|
@@ -149,10 +137,12 @@ data "aws_iam_policy_document" "queue" { | |
statement { | ||
sid = "AllowSendMessage" | ||
actions = ["sqs:SendMessage"] | ||
|
||
principals { | ||
type = "Service" | ||
identifiers = ["events.amazonaws.com"] | ||
} | ||
|
||
resources = [aws_sqs_queue.queue.arn] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
terraform { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of our tooling (eg, GH Actions) expects to have |
||
required_version = ">= 0.13.1" | ||
|
||
required_providers { | ||
aws = ">= 3.19" | ||
random = ">= 3" | ||
} | ||
} |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.