Resource: aws_cloudwatch_event_endpoint

Provides a resource to create an EventBridge Global Endpoint.

Example Usage

resource "aws_cloudwatch_event_endpoint" "this" {
  name     = "global-endpoint"
  role_arn = aws_iam_role.replication.arn

  event_bus {
    event_bus_arn = aws_cloudwatch_event_bus.primary.arn
  }
  event_bus {
    event_bus_arn = aws_cloudwatch_event_bus.secondary.arn
  }

  replication_config {
    state = "DISABLED"
  }

  routing_config {
    failover_config {
      primary {
        health_check = aws_route53_health_check.primary.arn
      }

      secondary {
        route = "us-east-2"
      }
    }
  }
}

Argument Reference

This resource supports the following arguments:

event_bus supports the following:

replication_config supports the following:

routing_config support the following:

failover_config support the following:

primary support the following:

secondary support the following:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import EventBridge Global Endpoints using the name. For example:

import {
  to = aws_cloudwatch_event_endpoint.imported_endpoint
  id = "example-endpoint"
}

Using terraform import, import EventBridge Global Endpoints using the name. For example:

% terraform import aws_cloudwatch_event_endpoint.imported_endpoint example-endpoint