Skip to content

Necessary Security Group not Created for SSM, KMS and ECR DKR Endpoints #249

Closed
@markmsmith

Description

Problem

When creating interface VPC Endpoints for SSM, KMS and ECR DKR (using the module variables enable_ssm_endpoint, enable_kms_endpoint and enable_ecr_dkr_endpoint respectively), the necessary security groups are not created, resulting in the errors:

module.network.module.vpc.aws_vpc_endpoint.ssm: 1 error(s) occurred:
* aws_vpc_endpoint.ssm: An Interface VPC Endpoint must always have at least one Security Group
* module.network.module.vpc.aws_vpc_endpoint.kms: 1 error(s) occurred:
* aws_vpc_endpoint.kms: An Interface VPC Endpoint must always have at least one Security Group
* module.network.module.vpc.aws_vpc_endpoint.ecr_dkr: 1 error(s) occurred:
* aws_vpc_endpoint.ecr_dkr: An Interface VPC Endpoint must always have at least one Security Group

There are already variables exposed to allow passing in pre-existing security groups for each of these, but since the security groups require the field vpc_id to be specified and we haven't created the VPC yet, there's no way to create one prior to invoking this module (unless I'm missing something).

Desired Behavior

A security group with the necessary ports (443 inbound etc) is created and associated to the endpoints whenever one or more interface VPC Endpoints are enabled, and is exposed as an output.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions