terraform-aws-modules / terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws
Apache License 2.0
754 stars 1.87k forks source link

Provider Default tags are not applied in volume_tags #313

Closed Scaldabagno closed 1 year ago

Scaldabagno commented 1 year ago

Description

When creating an ec2 instance with volume_tags flag active, adding tags and all, it does not add tags in default_tags section in aws provider definition. Meanwhile it does add these tags only to ec2 . These tags are, for example:

provider "aws" {
  default_tags {
    tags = {
      Environment = "Test"
      Name        = "Provider Tag"
    }
  }
}

Versions

Reproduction Code [Required]

modue "ec2_instance" {
...
tags = var.tags
enable_volume_tags = true
volume_tags = var.tags
...
}

Steps to reproduce the behavior:

Expected behavior

It adds all tags, including the default ones

Actual behavior

It just adds tags given in input and not the default ones

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 1 year ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.