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

[Enhancement]: Support tags attribute in aws_appautoscaling_policy #28391

Closed
RJKeane2000 opened this issue Dec 16, 2022 · 3 comments · Fixed by #30172
Closed

[Enhancement]: Support tags attribute in aws_appautoscaling_policy #28391

RJKeane2000 opened this issue Dec 16, 2022 · 3 comments · Fixed by #30172
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/appautoscaling Issues and PRs that pertain to the appautoscaling service. tags Pertains to resource tagging.

Comments

@RJKeane2000
Copy link

Description

The aws_appautoscaling_policy resource creates CloudWatch metric alarms on our behalf. We're able to retrieve the arns of these alarms through the alarm_arns output attribute. CloudWatch metric alarms support tagging.

Can you add the "tags" attribute to the aws_appautoscaling_policy resource so that it can pass the tags to the generated CloudWatch metric alarms? Currently I run script in our pipeline to retrieve the alarm arns and execute the AWS CLI to tag each alarm accordingly.

I've also tried setting default_tags on the AWS provider but they do not carry forward to the CloudWatch metric alarms created by the aws_appautoscaling_policy resource.

Note about tags from cloudwatch_metric_alarm documentation:
tags - (Optional) A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Affected Resource(s) and/or Data Source(s)

  • aws_appautoscaling_policy

Potential Terraform Configuration

resource "aws_appautoscaling_policy" "ecs_policy" {
  name               = "scale-down"
  policy_type        = "StepScaling"
  resource_id        = aws_appautoscaling_target.ecs_target.resource_id
  scalable_dimension = aws_appautoscaling_target.ecs_target.scalable_dimension
  service_namespace  = aws_appautoscaling_target.ecs_target.service_namespace

  step_scaling_policy_configuration {
    adjustment_type         = "ChangeInCapacity"
    cooldown                = 60
    metric_aggregation_type = "Maximum"

    step_adjustment {
      metric_interval_upper_bound = 0
      scaling_adjustment          = -1
    }
  }

  tags = var.common_tags
}

References

No response

Would you like to implement a fix?

None

@RJKeane2000 RJKeane2000 added enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Dec 16, 2022
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/appautoscaling Issues and PRs that pertain to the appautoscaling service. label Dec 16, 2022
@justinretzolk justinretzolk added tags Pertains to resource tagging. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 19, 2023
@ewbankkit
Copy link
Contributor

Application Auto Scaling now supports resource tagging

Requires AWS SDK for Go v1.44.225: #30146.

@github-actions
Copy link

github-actions bot commented Jun 1, 2023

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 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/appautoscaling Issues and PRs that pertain to the appautoscaling service. tags Pertains to resource tagging.
Projects
None yet
3 participants