Open jatorcasso opened 2 years ago
Files identified in the description:
plugins/modules/ec2_vpc_endpoint.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/ec2_vpc_endpoint.py)If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @Etherdaemon @jillr @s-hertel @tremble click here for bot help
Strictly, if wait=False we should not wait. We could do something like change https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/ec2_vpc_endpoint.py#L379 to a try block, and in the case where the error we catch is InvalidVpcEndpointId.NotFound
and wait=False we just return without any endpoint details. I don't like this solution though, personally.
We could also make get_endpoints
optionally take extra error codes, include them in the params
if they exist, and in the call at line 379 pass in catch_extra_error_codes=[InvalidVpcEndpointId.NotFound]
. @tremble, you're using VPC Endpoints I believe, any thoughts here?
ETA: the second solution here is still technically a wait, just by a different name. So I guess it's more, do we want to change this behaviour or return an empty result?
Is there an issue with defaulting wait=True?
There's nothing inherently wrong with doing the wait, but it would be a change in the default behaviour of the module so we would have to treat it as breaking. We can do that, conventionally we're planning for a new major release, but we should have consensus.
Summary
While running integration tests for ec2_vpc_route_table (https://github.com/ansible-collections/amazon.aws/pull/690), I got an InvalidVpcEndpointId.NotFound error. After adding the parameter
wait: yes
, I no longer ran into the issue, but I feel that should be the default value on creation, rather than having to explicitly setting a wait parameter. Thoughts?Issue Type
Bug Report
Component Name
ec2_vpc_endpoint
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
No response
Steps to Reproduce
Expected Results
Expected a VPC endpoint to be created
Actual Results
Code of Conduct