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

Issue with aws_autoscale_notifications #2852

Closed
stack72 opened this issue Jul 27, 2015 · 3 comments · Fixed by #3043
Closed

Issue with aws_autoscale_notifications #2852

stack72 opened this issue Jul 27, 2015 · 3 comments · Fixed by #3043

Comments

@stack72
Copy link
Contributor

stack72 commented Jul 27, 2015

terraform version
Terraform v0.6.2-dev (8ce3d49895095bbb505d61ead7f79985a04172e3)

I am autogenerating my autoscale groups as follows:

resource "aws_autoscaling_notification" "slack_notifications" {
  group_names = [
    "${split(",", module.autoscalegroups.asg_names)}",
  ]
  notifications  = [
    "autoscaling:EC2_INSTANCE_LAUNCH",
    "autoscaling:EC2_INSTANCE_TERMINATE",
    "autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
    "autoscaling:EC2_INSTANCE_TERMINATE_ERROR",
    "autoscaling:TEST_NOTIFICATION"
  ]
  topic_arn = "<myid>"
}

"${split(",", module.autoscalegroups.asg_names)} generates 21 items

The first time I ran this, 21 autoscale groups managed to be setup for notifications. On subsequenet runs, I get the following:

~ aws_autoscaling_notification.slack_notifications
    group_names.#:          "10" => "21"
    group_names.1065378116: "jenkins-master-autoscale-group" => "jenkins-master-autoscale-group"
    group_names.1143610102: "" => "onboarding-api-autoscale-group"
    group_names.1551555067: "" => "zookeeper-autoscale-group"
    group_names.1775765155: "demo-autoscale-group" => "demo-autoscale-group"
    group_names.1825398809: "" => "media-unit-processor-autoscale-group"
    group_names.2001686116: "dataset-processor-autoscale-group" => "dataset-processor-autoscale-group"
    group_names.2181398257: "" => "riak-autoscale-group"
    group_names.2215067414: "internal-api-autoscale-group" => "internal-api-autoscale-group"
    group_names.2232067133: "" => "rundeck-autoscale-group"
    group_names.2544646555: "dash-autoscale-group" => "dash-autoscale-group"
    group_names.2565852587: "docker-autoscale-group" => "docker-autoscale-group"
    group_names.2847475804: "" => "sensu-autoscale-group"
    group_names.2859170366: "" => "moby-autoscale-group"
    group_names.3180059775: "logstash-autoscale-group" => "logstash-autoscale-group"
    group_names.321274248:  "kibana-autoscale-group" => "kibana-autoscale-group"
    group_names.3491778723: "" => "pipeline-orchestrator-autoscale-group"
    group_names.3561705206: "" => "rich-autoscale-group"
    group_names.3712526780: "kafka-autoscale-group" => "kafka-autoscale-group"
    group_names.4014587927: "elasticsearch-autoscale-group" => "elasticsearch-autoscale-group"
    group_names.532516875:  "" => "teamcity-server-autoscale-group"
    group_names.943818252:  "" => "uchiwa-autoscale-group"

Can the resource only deal with 10 items and thus think it needs to generate 11 more?

Paul

@catsby
Copy link
Contributor

catsby commented Aug 20, 2015

Hey @stack72 – the DescribeNotificationConfigurations API returns a paginated result set, basically 1 entry for each ASG+Notification type. We're only calling it once, so we aren't getting the full list.

I have a working patch here, just need to write a test for it. Should land tonight/tomorrow!

@catsby
Copy link
Contributor

catsby commented Aug 21, 2015

Patched in #3043

@ghost
Copy link

ghost commented May 1, 2020

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.

@ghost ghost locked and limited conversation to collaborators May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants