Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ terraform apply --auto-approve
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.79.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.34.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.79.0 |

## Modules

Expand All @@ -36,22 +37,24 @@ No modules.
| [aws_vpc_endpoint_connection_notification.name](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint_connection_notification) | resource |
| [aws_vpc_endpoint_service.name](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint_service) | resource |
| [aws_vpc_endpoint_service_allowed_principal.name](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint_service_allowed_principal) | resource |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_acceptance_required"></a> [acceptance\_required](#input\_acceptance\_required) | Acceptance required on the privatelink access | `bool` | `true` | no |
| <a name="input_allowed_principals"></a> [allowed\_principals](#input\_allowed\_principals) | Allowed principals to access your service, applies Tags to each principal | <pre>list(object({<br> principal = string<br> tags = optional(list(map(any)))<br> }))</pre> | <pre>[<br> {<br> "principal": "arn:aws:iam::123456789012:root",<br> "tags": [<br> {<br> "key": "Customer",<br> "value": "Default1"<br> }<br> ]<br> }<br>]</pre> | no |
| <a name="input_allowed_principals"></a> [allowed\_principals](#input\_allowed\_principals) | Allowed principals to access your service, applies Tags to each principal | <pre>list(object({<br/> principal = string<br/> tags = optional(list(map(any)))<br/> }))</pre> | <pre>[<br/> {<br/> "principal": "arn:aws:iam::123456789012:root",<br/> "tags": [<br/> {<br/> "key": "Customer",<br/> "value": "Default1"<br/> }<br/> ]<br/> }<br/>]</pre> | no |
| <a name="input_create_topic"></a> [create\_topic](#input\_create\_topic) | Create an SNS Topic to recieve notification events | `bool` | `false` | no |
| <a name="input_enable_notifications"></a> [enable\_notifications](#input\_enable\_notifications) | Create Notifications for endpoint activity | `bool` | `false` | no |
| <a name="input_endpoint_connection_notification_events"></a> [endpoint\_connection\_notification\_events](#input\_endpoint\_connection\_notification\_events) | List of connection events on your service endpoint | `list(string)` | <pre>[<br> "Accept",<br> "Reject"<br>]</pre> | no |
| <a name="input_endpoint_connection_notification_events"></a> [endpoint\_connection\_notification\_events](#input\_endpoint\_connection\_notification\_events) | List of connection events on your service endpoint | `list(string)` | <pre>[<br/> "Accept",<br/> "Reject"<br/>]</pre> | no |
| <a name="input_gateway_load_balancer_arns"></a> [gateway\_load\_balancer\_arns](#input\_gateway\_load\_balancer\_arns) | Arn of a Gateway Load balancer | `list(string)` | `null` | no |
| <a name="input_network_load_balancer_arns"></a> [network\_load\_balancer\_arns](#input\_network\_load\_balancer\_arns) | Arn of a network loadbalancer | `list(string)` | `null` | no |
| <a name="input_private_dns_name"></a> [private\_dns\_name](#input\_private\_dns\_name) | Private DNS name for endpoint | `string` | `null` | no |
| <a name="input_service_name"></a> [service\_name](#input\_service\_name) | Name of the Endpoint service | `string` | `"default-name"` | no |
| <a name="input_service_tags"></a> [service\_tags](#input\_service\_tags) | Map of tags for the service | `map(any)` | `{}` | no |
| <a name="input_supported_ip_address_types"></a> [supported\_ip\_address\_types](#input\_supported\_ip\_address\_types) | List of Support IP Address Types | `list(string)` | <pre>[<br> "ipv4"<br>]</pre> | no |
| <a name="input_supported_ip_address_types"></a> [supported\_ip\_address\_types](#input\_supported\_ip\_address\_types) | List of Support IP Address Types | `list(string)` | <pre>[<br/> "ipv4"<br/>]</pre> | no |
| <a name="input_supported_regions"></a> [supported\_regions](#input\_supported\_regions) | The set of regions from which service consumers can access the service. | `list(string)` | `[]` | no |

## Outputs

Expand Down
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
data "aws_region" "current" {}

resource "aws_vpc_endpoint_service" "name" {
acceptance_required = var.acceptance_required

Expand All @@ -8,6 +10,7 @@ resource "aws_vpc_endpoint_service" "name" {

private_dns_name = var.private_dns_name
supported_ip_address_types = var.supported_ip_address_types
supported_regions = concat([data.aws_region.current.name], var.supported_regions)
}

resource "aws_vpc_endpoint_service_allowed_principal" "name" {
Expand Down
7 changes: 7 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ variable "create_topic" {

type = bool
}

variable "supported_regions" {
description = "The set of regions from which service consumers can access the service."
default = []

type = list(string)
}
3 changes: 2 additions & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ terraform {
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
version = ">= 5.79.0"
}
}
}