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

r/aws_autoscaling_group: Remove deprecated tags argument #22905

Closed
anGie44 opened this issue Feb 2, 2022 · 6 comments
Closed

r/aws_autoscaling_group: Remove deprecated tags argument #22905

anGie44 opened this issue Feb 2, 2022 · 6 comments
Assignees
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. enhancement Requests to existing resources that expand the functionality or scope.
Milestone

Comments

@anGie44
Copy link
Contributor

anGie44 commented Feb 2, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The tags argument was deprecated in the v4.0 major milestone and should be removed in the next one (v5.0).

Relates:

@anGie44 anGie44 added enhancement Requests to existing resources that expand the functionality or scope. breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. labels Feb 2, 2022
@anGie44 anGie44 added this to the v5.0.0 milestone Feb 2, 2022
@postmaxin
Copy link

Hi,
I am just seeing this warning attempting to upgrade to 1.1. What is the replacement for "tags"? "tag" doesn't seem sufficient. For example, I have a few modules that accept a list of tags as an input and apply all of those tags to all resources within the module. These are merged with standard tags for that module, and then, in turn, applied to resources:

  tags = concat(local.asg_standard_tags, [
    {
      key = "Name"
      value = "${local.azs[count.index]}.disk.${module.k8s_common.cluster_fqdn}"
      propagate_at_launch = true
    },
    {
      key = "chef_bootstrap_data"
      value = "CHEF_POLICY_NAME=${local.chef["node_policy"]["disk"]}::CHEF_POLICY_GROUP=${local.chef["misc"]["policy_group"]}"
      propagate_at_launch = true
    },
    {
      key = "k8s.io/role/disk"
      value = "1"
      propagate_at_launch = true
    },
[...]

@phardy
Copy link

phardy commented Feb 14, 2022

@postmaxin Use a dynamic block. For my use, we were generating tags based on a map like this

tags = [for k, v in var.tags: {
  key                 = k
  value               = v
  propagate_at_launch = false
}]

and have replaced it with this

dynamic "tag" {
  for_each = var.tags
  content {
    key                 = tag.key
    value               = tag.value
    propagate_at_launch = false
  }
}

@omerh
Copy link

omerh commented May 3, 2022

Adding extra info for non static locals that might help

in addition to the static tags defined in a local

locals {
  tags = {
    Name = "eks-${var.name}"
    "${var.group}" = true
  }
}

and an external map variable added and merged

variable "tags" {
  type    = map(string)
  default = {}
}

I've added a count index, that must be inside the auto scale group as follow

dynamic "tag" {
    for_each = merge(local.cluster_tags, var.tags, {az_count = count.index})
    content {
      key = tag.key
      value = tag.value
      propagate_at_launch = true
    }
  }

Works on 4.12.1
Hope it helps anyone

@jar-b
Copy link
Member

jar-b commented May 23, 2023

Closed by #30842, merged to main via #31392

@jar-b jar-b closed this as completed May 23, 2023
@github-actions
Copy link

This functionality has been released in v5.0.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

No branches or pull requests

5 participants