Skip to content

Add Support for Tagging network-interface in tag_specifications Block #1207

@mandresuri

Description

@mandresuri

Describe the solution you'd like

I would like the ability to add tags for the network-interface resource in the tag_specifications block of our Terraform configuration. This would allow consistent tagging across all resources associated with an instance, such as volumes, spot instance requests, and network interfaces.

The use case for this feature is to ensure all resources are easily identifiable and aligned with the tagging policies defined in local.tags. This can be particularly useful for auditing, resource tracking, and cost management.

Describe alternatives you've considered

Manual tagging: I have considered adding the tags manually to the network-interface after resource creation. However, this approach is error-prone, does not scale, and introduces inconsistencies in infrastructure as code.

Custom modules: Another alternative was to write custom modules to handle tagging for all associated resources, but this adds unnecessary complexity and duplicates functionality already provided in the tag_specifications block.

Suggest a solution

Add a new tag_specifications block for the network-interface resource type:

tag_specifications {
  resource_type = "network-interface"
  tags          = local.tags
}

Additional context

This proposal aims to align with tagging policies for EC2-related resources. The feature would be consistent with existing blocks for volume and spot-instances-request.

Adding the network-interface tag support would provide a unified approach to resource tagging and ensure compliance with tagging requirements.

Metadata

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