-
Notifications
You must be signed in to change notification settings - Fork 342
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
[PR #1150/395d4fda backport][stable-5] ec2_instance: fix to handle create instance in specified AZ #1184
Merged
softwarefactory-project-zuul
merged 1 commit into
stable-5
from
patchback/backports/stable-5/395d4fda1ec549020d070d4465835166094e4777/pr-1150
Oct 19, 2022
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec2_instance: fix to handle create instance in specified AZ SUMMARY This PR adds a fix to allow launching an instance in specified AZ when vpc_subnet_id is not specified. The current code does not consider the AZ and launches the instance in default subnet of default vpc for the specified region. https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/ec2_instance.py#L1584-L1593 Fixes #1120 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_instance ADDITIONAL INFORMATION Without the fix, the below playbook will launch instance in default subnet ignoring specified AZ. Example Playbook to launch instance in us-west-2b AZ. --- - name: Spin up ec2 instance hosts: localhost gather_facts: false tasks: - name: Launch regular ec2 instances in us-west-1b amazon.aws.ec2_instance: name: "test-instance-us-west-1b" instance_type: t2.micro image_id: ami-xxxxx state: present availability_zone: us-west-1b region: us-west-1 tags: terminate-this: yes network: assign_public_ip: yes register: create_result - ec2_instance_info: instance_ids: - "{{ create_result.instance_ids[0] }}" region: us-west-1 register: info_result - assert: that: info_result.instances[0].placement.availability_zone == 'us-west-1b' Reviewed-by: Mike Graves <[email protected]> Reviewed-by: Gonéri Le Bouder <[email protected]> (cherry picked from commit 395d4fd)
tremble
approved these changes
Oct 19, 2022
ansibullbot
added
bug
This issue/PR relates to a bug
community_review
integration
tests/integration
module
module
new_contributor
Help guide this first time contributor
plugins
plugin (any type)
tests
tests
labels
Oct 19, 2022
softwarefactory-project-zuul
bot
deleted the
patchback/backports/stable-5/395d4fda1ec549020d070d4465835166094e4777/pr-1150
branch
October 19, 2022 17:00
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this pull request
Sep 18, 2023
…tions#1184) ecs_tag/efs_tag - add resource_tags as alias for tags SUMMARY Cleanup related to the tagging fragment ISSUE TYPE Feature Pull Request COMPONENT NAME ecs_tag efs_tag ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None> Reviewed-by: Mark Chappell <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this pull request
Sep 18, 2023
…tions#1184) ecs_tag/efs_tag - add resource_tags as alias for tags SUMMARY Cleanup related to the tagging fragment ISSUE TYPE Feature Pull Request COMPONENT NAME ecs_tag efs_tag ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None> Reviewed-by: Mark Chappell <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this pull request
Oct 24, 2023
…tions#1184) ecs_tag/efs_tag - add resource_tags as alias for tags SUMMARY Cleanup related to the tagging fragment ISSUE TYPE Feature Pull Request COMPONENT NAME ecs_tag efs_tag ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None> Reviewed-by: Mark Chappell <None>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
This issue/PR relates to a bug
community_review
integration
tests/integration
mergeit
Merge the PR (SoftwareFactory)
module
module
new_contributor
Help guide this first time contributor
plugins
plugin (any type)
tests
tests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #1150 as merged into main (395d4fd).
SUMMARY
This PR adds a fix to allow launching an instance in specified AZ when
vpc_subnet_id
is not specified.The current code does not consider the AZ and launches the instance in
default subnet
ofdefault vpc
for the specified region.https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/ec2_instance.py#L1584-L1593
Fixes #1120
ISSUE TYPE
COMPONENT NAME
ec2_instance
ADDITIONAL INFORMATION
Without the fix, the below playbook will launch instance in
default subnet
ignoring specifiedAZ
.Example Playbook to launch instance in
us-west-2b
AZ.