Skip to content

InvalidParameterValue: Certificate <certificate_arn> does not have a domain #57

@afdecastro879

Description

@afdecastro879

Describe the Bug

When using this module the server certificate is created successfully, but when trying to create the aws_ec2_client_vpn_endpoint.default[0] resource it fails as the created certificate does not have a domain:

Error: error creating EC2 Client VPN Endpoint: InvalidParameterValue: Certificate <certiicate_arn> does not have a domain

My configuration is very simple:

module "ec2_client_vpn" {
  source  = "cloudposse/ec2-client-vpn/aws"
  version = "0.13.0"

  associated_subnets  = var.private_subnets
  client_cidr         = var.client_cidr
  logging_stream_name = null
  organization_name   = <my_org_name>
  vpc_id = var.vpc_id

  additional_routes = [
    {
      destination_cidr_block = "0.0.0.0/0"
      description            = "Internet Route"
      target_vpc_subnet_id   = element(var.private_subnets, 0)
    }
  ]
}

Expected Behavior

The module.ec2_client_vpn.aws_ec2_client_vpn_endpoint.default[0] resource should be created.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Provide private_subnets, vpc_id, client_cidr and a valid org_name to the following snippet
module "ec2_client_vpn" {
  source  = "cloudposse/ec2-client-vpn/aws"
  version = "0.13.0"

  associated_subnets  = var.private_subnets
  client_cidr         = var.client_cidr
  logging_stream_name = null
  organization_name   = <my_org_name>
  vpc_id = var.vpc_id

  additional_routes = [
    {
      destination_cidr_block = "0.0.0.0/0"
      description            = "Internet Route"
      target_vpc_subnet_id   = element(var.private_subnets, 0)
    }
  ]
}
  1. Run terraform apply
  2. The module should fail with the error Error: error creating EC2 Client VPN Endpoint: InvalidParameterValue: Certificate <certiicate_arn> does not have a domain

Environment (please complete the following information):

  • Using Mac OS silicon
  • Monterey v12.3.1
  • terraform 1.1.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions