Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: set volume_tags on aws_instance resource #187

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

TomerHeber
Copy link
Collaborator

resolves #186

  1. Added special handling for aws_instance resource.
  2. Added an acceptance test for this use-case.

@TomerHeber
Copy link
Collaborator Author

Note: tests are failing due to an unrelated issue. (A bug in azure provider). This will probably be resolved very soon.

hashicorp/terraform-provider-azurerm#24749

@TomerHeber TomerHeber merged commit 36ff306 into master Feb 15, 2024
6 of 9 checks passed
@terenho-jobber
Copy link

This PR uses volume_tags in aws_instance https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#volume_tags, and it causes "root_block_device.0.tags": conflicts with volume_tags error with tags defined for the volumes.

To reproduce, the code below when run with Terraform in env0 would fail planning with "root_block_device.0.tags": conflicts with volume_tags

resource "aws_instance" "test_ec2" {
  ami                    = "ami-0f5daaa3a7fb3378b"
  instance_type          = "t2.micro"
  subnet_id              = "..."
  vpc_security_group_ids = [...]

  root_block_device {
    volume_size = 8
    tags = {
      Name = "test-ec2"
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: set volume_tags on aws_instance resource
3 participants