It seems the new volume_tags (thanx btw!) gets confused when there's more than one volume attached to an instance.
0.9.4
Please list the resources as a list, for example:
resource "aws_instance" "instance" {
  root_block_device {
    volume_type               = "standard"
    volume_size               = 8
  }
  volume_tags {
    Name                      = "my-instance-root"
  }
}
resource "aws_ebs_volume" "instance" {
  tags {
    Name                      = "my-instance-db"
  }
}
resource "aws_volume_attachment" "instance" {
  instance_id                 = "${aws_instance.instance.id}"
  volume_id                   = "${aws_ebs_volume.instance.id}"
  device_name                 = "/dev/sdb"
}
Nothing.
Every other time it modified the aws_ebs_volume tags and every other on the aws_instance.
terraform applyThat is, it sometimes thinks that the tag on aws_ebs_volume is the root volume..
I have the same issue.
Looks like it is not matching this definition
A mapping of tags to assign to the devices created by the instance at launch time.
and trying to manage separately created and then attached volumes.
Hi @FransUrbo / @stumyp
I am currently looking into this now
Paul
I also confirm the issue.
I also confirm the issue.
Seems related to #14019?
I too, am affected by this issue.
We are seeing the same issue.
This is already fixed in 9.5
Thanks for letting us know, @ezalejski! Indeed it looks like this issue was addressed by #14007, which was included in the 0.9.5 release, so I'm going to close this.
I'm still seeing this issue with Terraform v0.9.5.
First time when the instance and ebs volumes are created it sets the correct tags - root volume gets the tags from volume_tags, ebs volumes get their own.
When I recreate the instance keeping the existing ebs volumes, all tags are replaced by the ones in volume_tags.
v0.9.5 Fixed the issue when the tags were just disappearing. Now it just sets the incorrect ones.
ok, as promised to @stack72 , confirming that this is not solved.
Example:
aws_instance has
volume_tags {
Name = "A"
}
and there is second aws_ebs_volume / aws_volume_attachment with 
tags{
Name = "B"
}
First apply sets root volume with Name=A and second volume Name=B
second apply changes second volume tag to Name=A
third changes it to Name=B and so on.
Expected behaviour:
root volume gets tags from volume_tags
any additionally attached volumes can override those tags with tags block
https://github.com/hashicorp/terraform/issues/14107#issuecomment-302912704
same issue here.
commenting out volume_tags to work around issue.
@apparentlymart @stack72 Could someone please reopen this issue since it isn't solved?
@apparentlymart @stack72 FYI, though hashibot closed this a few months ago, it is still an issue as of terraform 0.11.1
I added a second volume to an existing instance with its own tags, and now aws_instance and aws_ebs_volume take turns performing an update in place to toggle the tags back and forth.
Hi @ddsdevon! This issue was migrated to terraform-providers/terraform-provider-aws#729 as part of splitting the AWS provider out into its own repository. The AWS provider is no longer developed in this repository.
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.
Most helpful comment
ok, as promised to @stack72 , confirming that this is not solved.
Example:
aws_instance has
and there is second
aws_ebs_volume/aws_volume_attachmentwithFirst
applysets root volume withName=Aand second volumeName=Bsecond
applychanges second volume tag toName=Athird changes it to
Name=Band so on.Expected behaviour:
root volume gets tags from
volume_tagsany additionally attached volumes can override those tags with
tagsblock