File tree Expand file tree Collapse file tree 3 files changed +64
-0
lines changed
Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ provider "aws" {
2+ region = " us-east-1"
3+ }
4+
5+ data "aws_caller_identity" "this" {}
6+ data "aws_region" "this" {}
7+
8+ locals {
9+ account_id = data. aws_caller_identity . this . account_id
10+ region = data. aws_region . this . name
11+ }
12+
13+
14+ # ##################################################
15+ # Event Bus on EventBridge
16+ # ##################################################
17+
18+ module "event_bus" {
19+ source = " ../../modules/eventbridge-event-bus"
20+ # source = "tedilabs/messaging/aws//modules/eventbridge-event-bus"
21+ # version = "~> 0.2.0"
22+
23+ name = " aws"
24+ policy = jsonencode (yamldecode (<< EOF
25+ Version: "2008-10-17"
26+ Statement:
27+ - Sid: "AllowAccountToPutEvents"
28+ Effect: "Allow"
29+ Principal:
30+ "AWS": "${ local . account_id } "
31+ Action:
32+ - "events:PutEvents"
33+ Resource: "arn:aws:events:${ local . region } :${ local . account_id } :event-bus/aws"
34+ EOF
35+ ))
36+
37+ archives = [
38+ {
39+ name = " test"
40+ description = " Test Archive"
41+ }
42+ ]
43+ schema_discovery = {
44+ enabled = false
45+ }
46+
47+ tags = {
48+ " project" = " terraform-aws-messaging-examples"
49+ }
50+ }
Original file line number Diff line number Diff line change 1+ output "event_bus" {
2+ description = " The event bus on EventBridge."
3+ value = module. event_bus
4+ }
Original file line number Diff line number Diff line change 1+ terraform {
2+ required_version = " ~> 1.3"
3+
4+ required_providers {
5+ aws = {
6+ source = " hashicorp/aws"
7+ version = " ~> 4.0"
8+ }
9+ }
10+ }
You can’t perform that action at this time.
0 commit comments