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

aws_autoscaling_group cannot be created with lifecycle hooks in place for its instances #5619

Closed
pcarrier opened this issue Mar 14, 2016 · 2 comments · Fixed by #5620
Closed

Comments

@pcarrier
Copy link
Contributor

It's useful to have lifecycle hooks in place by the time an instance gets created, so all instances can be required to report their boot status through that lifecycle hook.

Unfortunately lifecycle hooks can only be created once the ASG is created.

A proposal is to support creating those at ASG creation time by adding something along the lines of this in the resourceAwsAutoscalingGroup schema:

            "initial_lifecycle_hooks": {
                Type:     schema.TypeSet,
                Optional: true,
                Elem: &schema.Resource{
                    Schema: map[string]*schema.Schema{
                        "name": &schema.Schema{
                            Type:     schema.TypeString,
                            Required: true,
                        },
                        "default_result": &schema.Schema{
                            Type:     schema.TypeString,
                            Optional: true,
                            Computed: true,
                        },
                        "heartbeat_timeout": &schema.Schema{
                            Type:     schema.TypeInt,
                            Optional: true,
                        },
                        "lifecycle_transition": &schema.Schema{
                            Type:     schema.TypeString,
                            Required: true,
                        },
                        "notification_metadata": &schema.Schema{
                            Type:     schema.TypeString,
                            Optional: true,
                        },
                        "notification_target_arn": &schema.Schema{
                            Type:     schema.TypeString,
                            Optional: true,
                        },
                        "role_arn": &schema.Schema{
                            Type:     schema.TypeString,
                            Optional: true,
                        },
                    },
                },
            },

Does that sound acceptable?

Cc @catsby @phinze

pcarrier pushed a commit to meteor/terraform that referenced this issue Mar 22, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Mar 29, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Mar 29, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Apr 19, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Apr 19, 2016
glasser pushed a commit to meteor/terraform that referenced this issue May 5, 2016
glasser pushed a commit to meteor/terraform that referenced this issue May 17, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Jun 21, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Jun 27, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Jul 7, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Jul 7, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Jul 22, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Aug 10, 2016
glasser pushed a commit to meteor/terraform that referenced this issue Aug 22, 2016
@luizsoares
Copy link

👍 I'm hitting this exact problem. I'm not qualified to judge your implementation but the idea is great

@ghost
Copy link

ghost commented Apr 22, 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 Apr 22, 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.

3 participants