Skip to content

Commit

Permalink
feat: Add pass-through of ownership_verification_certificate_arn to d…
Browse files Browse the repository at this point in the history
…omain_name (#72)
  • Loading branch information
kmannuz authored Jun 13, 2022
1 parent 43ea60f commit 5709873
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ module "api_gateway" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.24 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0 |

## Providers

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

## Modules

Expand Down Expand Up @@ -160,6 +160,7 @@ No modules.
| <a name="input_disable_execute_api_endpoint"></a> [disable\_execute\_api\_endpoint](#input\_disable\_execute\_api\_endpoint) | Whether clients can invoke the API by using the default execute-api endpoint. To require that clients use a custom domain name to invoke the API, disable the default endpoint | `string` | `false` | no |
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | The domain name to use for API gateway | `string` | `null` | no |
| <a name="input_domain_name_certificate_arn"></a> [domain\_name\_certificate\_arn](#input\_domain\_name\_certificate\_arn) | The ARN of an AWS-managed certificate that will be used by the endpoint for the domain name | `string` | `null` | no |
| <a name="input_domain_name_ownership_verification_certificate_arn"></a> [domain\_name\_ownership\_verification\_certificate\_arn](#input\_domain\_name\_ownership\_verification\_certificate\_arn) | ARN of the AWS-issued certificate used to validate custom domain ownership (when certificate\_arn is issued via an ACM Private CA or mutual\_tls\_authentication is configured with an ACM-imported certificate.) | `string` | `null` | no |
| <a name="input_domain_name_tags"></a> [domain\_name\_tags](#input\_domain\_name\_tags) | A mapping of tags to assign to API domain name resource. | `map(string)` | `{}` | no |
| <a name="input_integrations"></a> [integrations](#input\_integrations) | Map of API gateway routes with integrations | `map(any)` | `{}` | no |
| <a name="input_mutual_tls_authentication"></a> [mutual\_tls\_authentication](#input\_mutual\_tls\_authentication) | An Amazon S3 URL that specifies the truststore for mutual TLS authentication as well as version, keyed at uri and version | `map(string)` | `{}` | no |
Expand Down
7 changes: 4 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ resource "aws_apigatewayv2_domain_name" "this" {
domain_name = var.domain_name

domain_name_configuration {
certificate_arn = var.domain_name_certificate_arn
endpoint_type = "REGIONAL"
security_policy = "TLS_1_2"
certificate_arn = var.domain_name_certificate_arn
ownership_verification_certificate_arn = var.domain_name_ownership_verification_certificate_arn
endpoint_type = "REGIONAL"
security_policy = "TLS_1_2"
}

dynamic "mutual_tls_authentication" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ variable "domain_name_certificate_arn" {
default = null
}

variable "domain_name_ownership_verification_certificate_arn" {
description = "ARN of the AWS-issued certificate used to validate custom domain ownership (when certificate_arn is issued via an ACM Private CA or mutual_tls_authentication is configured with an ACM-imported certificate.)"
type = string
default = null
}

variable "domain_name_tags" {
description = "A mapping of tags to assign to API domain name resource."
type = map(string)
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.24"
version = ">= 4.0"
}
}
}

0 comments on commit 5709873

Please sign in to comment.