-
Notifications
You must be signed in to change notification settings - Fork 341
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
[WIP] ec2_instance: ability to change the instance type #1890
base: main
Are you sure you want to change the base?
[WIP] ec2_instance: ability to change the instance type #1890
Conversation
Docs Build 📝Thank you for contribution!✨ The docsite for this PR is available for download as an artifact from this run: You can compare to the docs for the File changes:
Click to see the diff comparison.NOTE: only file modifications are shown here. New and deleted files are excluded. diff --git a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_instance_module.html b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_instance_module.html
index 18ddcd2..362f4b5 100644
--- a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_instance_module.html
+++ b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_instance_module.html
@@ -506,6 +506,7 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-ec2-inst
<td><div class="ansible-option-cell"><p>Instance type to use for the instance, see <a class="reference external" href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html</a>.</p>
<p>Only required when instance is not already present.</p>
<p>At least one of <em>instance_type</em> or <em>launch_template</em> must be specificed when launching an instance.</p>
+<p>To change the <em>instance_type</em>, the instance must be in <em>state=stopped</em>.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
|
Something weird happens here, while the local integration test succeeds.
I'm not sure what happens here. do you have any ideas @tremble |
|
||
- name: "start instance as t3.micro" | ||
ec2_instance: | ||
state: stopped |
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.
In addition to not matching the name of the task I suspect this is the cause of the CI failure. state: stopped
probably introduces a race condition: since the instance is already in the stopped
state there's no actual waiting and the change may not yet be reflected in the fetched instance description.
SUMMARY
Currently the
ec2_instance
module ignores changes oninstance_type
parameter.Furthermore, changes on
instance_type
is only possible when thestate
isstopped
.ISSUE TYPE
COMPONENT NAME
ec2_instance
ADDITIONAL INFORMATION