Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Apply 'extra tags' to autoscaling groups #1314

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

estroz
Copy link
Contributor

@estroz estroz commented Jul 7, 2017

installer/frontend/: 'tectonic_autoscaling_group_extra_tags' will be populated by data from user-provided tags.

User-defined 'extra' tags are not being applied to autoscaling groups because tag data doesn't populate tectonic_autoscaling_group_extra_tags.

Applies to #1115

@estroz estroz requested review from ggreer, sym3tri, amrutac and kans July 7, 2017 07:43
@estroz estroz force-pushed the autoscaling-group-tags branch from 64cce88 to 1b16a5a Compare July 7, 2017 07:52
const extraAutoScalingTags = {};
_.each(cc[AWS_TAGS], ({key, value}) => {
if(key && value) {
extraAutoScalingTags.key = key;
Copy link
Contributor

@kans kans Jul 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also be OK to dump these three lines into the loop above.

edit:
It looks like extraAutoScalingTags should be an array and you should push objects onto it like so:

const extraAutoScalingTags = [];
...
extraAutoScalingTags.push({key, value, propagate_at_launch: true});

Copy link
Contributor Author

@estroz estroz Jul 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing now.
I kept the autoscaling tags in a separate loop to keep the code clean.

@estroz estroz force-pushed the autoscaling-group-tags branch 3 times, most recently from 39db2d3 to 5db4011 Compare July 7, 2017 21:08
@@ -54,6 +54,13 @@
"value": "testing"
}
],
"awsASGTags": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should remove "awsASGTags" from both progress files (which will also get rid of the console.errors) - you'd only want these here if we were storing the tags in memory at this location, but we only really want to output a new tfvar.

@@ -20,6 +20,7 @@ export const AWS_SECRET_ACCESS_KEY = 'awsSecretAccessKey';
export const AWS_SESSION_TOKEN = 'awsSessionToken';
export const AWS_SSH = 'aws_ssh';
export const AWS_TAGS = 'awsTags';
export const AWS_ASG_TAGS = 'awsASGTags';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is being used.

@estroz estroz force-pushed the autoscaling-group-tags branch from 5db4011 to cb4f436 Compare July 7, 2017 21:21
@estroz estroz changed the title [WIP] Apply 'extra tags' to autoscaling groups Apply 'extra tags' to autoscaling groups Jul 7, 2017
@estroz estroz merged commit b018c80 into coreos:master Jul 7, 2017
@estroz estroz deleted the autoscaling-group-tags branch July 7, 2017 23:10
estroz added a commit to estroz/tectonic-installer that referenced this pull request Jul 10, 2017
…tags"

This reverts commit b018c80, reversing
changes made to d684cca.
kans added a commit that referenced this pull request Jul 10, 2017
Revert "Merge pull request #1314 from estroz/autoscaling-group-tags"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants