-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
BREAKING CHANGE: update module to include latest features and remove use of count
for module count
/for_each
#234
BREAKING CHANGE: update module to include latest features and remove use of count
for module count
/for_each
#234
Conversation
…l where appropriate
…tance into chore/update-to-latest-features
…tance into chore/update-to-latest-features
8f37e88
to
23d9a3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this amount of improvements!
df2c942
to
bed9dd0
Compare
bed9dd0
to
886e576
Compare
8630a90
to
8ff1dd5
Compare
my local |
I stopped managing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
# EC2 Multiple | ||
output "ec2_multiple" { | ||
description = "The full output of the `ec2_module` module" | ||
value = module.ec2_multiple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output for lazy people :)
I fixed the docs, is there anything else in this PR? |
Thank you! No, I think we should be all set - I'll keep an eye in case any issues start popping up |
Cool, v3.0.0 has been just released. |
hey @bryantbiggs @antonbabenko, thank you for your work on this! Quick question in regards to this release - what was the reasoning behind removing some of the outputs, e.g. availability_zone/private_ip? |
The main reason for that is that those attributes (outputs) are not in the resource itself (see aws_instance docs). We probably had them in the past but they were actually arguments (inputs). |
@antonbabenko so I think Hashicorp have changed layout of docs a little, and outputs block does not explicitly mention all of the outputs, as it also includes inputs as part of outputs. This is listed in outputs part of docs: I've tested it with a forked version - https://github.com/firke/terraform-aws-ec2-instance
|
You are absolutely right, you could always use arguments as outputs. And we sometimes did this (and maybe still do) to implement poor-man |
Ah, I see, this clicked with me just recently about the docs. So using same example of private_ip, referencing which should be a trivial task, my understanding is just now without these outputs it's not possible, and if these are not returned will either need to use forked version or use a data source for an ec2_instance object? Sorry if I've missed something. :) Added: slight clarification as well - i'm not setting private_ip as part of module, but it is still available as output. |
You're right about using the data-source |
@antonbabenko Looks like it's not so handy, especially to use this module with terragrunt. |
This module creates an EC2 instance so that it is possible to get some more information about the resource using data source in other places. In terragrunt you can use |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
count
for modulecount
/for_each
basic
example renamed tocomplete
- no longer just basic and shows multiple examples for more of a complete setupNew attributes added
hibernation
secondary_private_ips
capacity_reservation_specification
launch_template
enclave_options
host_id
timeouts
Removed variables
instance_count
subnet_ids
private_ips
use_num_suffix
num_suffix_format
Renamed outputs
count
Removed Outputs
availability_zone
placement_group
key_name
ipv6_addresses
private_ip
security_groups
vpc_security_group_ids
subnet_id
credit_specification
metadata_options
root_block_device_volume_ids
ebs_block_device_volume_ids
volume_tags
instance_count
Motivation and Context
count
andfor_each
, this means users can create as many ec2 instances as necessary with the module as opposed to the module itself trying to control how many instances are created. in addition, the use offor_each
is preferred to avoid disruptive updates that can be encountered when using count and modifying one of the resources within the listCloses #92
Closes #160
Closes #173
Closes #188
Closes #213
Closes #230
Breaking Changes
UPGRADE-3.0.md
for upgrade instructionsHow Has This Been Tested?
examples/*
projects