Closed lbajolet-hashicorp closed 1 year ago
Does the call to describeInstnaceOfferings require a different set of permissions?
I'm not completely sure, but it may require the ec2:DescribeInstanceTypeOfferings
action to be allowed for the account indeed.
We could amend the code so that if the call fails because of a missing permission, we still attempt to pick a subnet, without checking for the capability to host the type of instance requested, along with a warning that we may pick a subnet that can't support it without having this capability.
Had verbal confirmation that Wilken was OK with the current state of the PR, so I'm merging this as-is.
This PR is an attempt to fix the problem where we pick a subnet that cannot spawn an instance of the type requested as the AZ linked to the subnet does not support it.
We also add some basic unit-tests for the step, which will be improved upon in upcoming PRs.
Related to #368 Related to #371