packer-plugin-amazon icon indicating copy to clipboard operation
packer-plugin-amazon copied to clipboard

Add tags with ENI

Open 9to6 opened this issue 2 years ago • 0 comments

Description

Hi. I want to attach tags with ENI too on Packer Builder instance. But doesn't support it until now. I've tested in my machine which work well, this one(https://github.com/9to6/packer-plugin-amazon/commit/780e56a4c15cc86de5e21f4c606bb8ef95ffd076)

	if len(ec2Tags) > 0 {
		launchTemplate.LaunchTemplateData.TagSpecifications = append(
			launchTemplate.LaunchTemplateData.TagSpecifications,
			&ec2.LaunchTemplateTagSpecificationRequest{
				ResourceType: aws.String("instance"),
				Tags:         ec2Tags,
			},
		)

		launchTemplate.LaunchTemplateData.TagSpecifications = append(
			launchTemplate.LaunchTemplateData.TagSpecifications,
			&ec2.LaunchTemplateTagSpecificationRequest{
				ResourceType: aws.String("network-interface"),
				Tags:         ec2Tags,
			},
		)
	}

Use Case(s)

I need it to force tags to any AWS resources

Potential configuration

Potential References

9to6 avatar Aug 18 '22 08:08 9to6