Skip to content

Added user data #2

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

Merged
merged 3 commits into from
Aug 23, 2017
Merged

Added user data #2

merged 3 commits into from
Aug 23, 2017

Conversation

goruha
Copy link
Member

@goruha goruha commented Aug 22, 2017

What

  • Added user data support

Why

  • User data support required for some our projects

@const-bon
Copy link
Contributor

Do we really need user data?
Why we don't use ansible for this purpose?

If the user data is changed, instance will be recreated.
But if we add changes to ansible playbook, instance will be re-provisioned without recreating.

@goruha
Copy link
Member Author

goruha commented Aug 22, 2017

@comeanother

Do we really need user data?

Yes we need.
I have project that does not use ansible.
@osterman want to start us reuse common code in different projects.
Eventually I believe we can use ansible on all projects, but for now tf_instance should be flexible enough
to start using it.

Why we don't use ansible for this purpose?

I do not want to add additional tool for small functionality.
I do not want to redo existed user_data scripts to ansible to make provision consisted in project

If the user data is changed, instance will be recreated.
But if we add changes to ansible playbook, instance will be re-provisioned without recreating.

True. But even in current situation if you will change github auth keys params instance would be rebuilded.
Also I do not see any problem in such behaviour.
I like that instances are immutable.

main.tf Outdated
@@ -103,7 +113,7 @@ resource "aws_eip" "default" {

# Apply the provisioner module for this resource
module "ansible" {
source = "git::https://github.com/cloudposse/tf_ansible.git?ref=tags/0.2.0"
source = "git::https://github.com/cloudposse/tf_ansible.git"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you remove ?ref=tags/0.2.0? If this tag do not corresponds to the latest commit in master let me know, I can add new tag.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch. Sec

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@goruha goruha merged commit 118f08f into master Aug 23, 2017
@goruha goruha deleted the feature-add-user-data branch August 23, 2017 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants