hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder

Home Page:https://www.packer.io/docs/builders/amazon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignore failure flag when ami datasource can't find ami

galbirk opened this issue · comments

Description

I would like to add an option for ami datasource that will "ignore failure" when a ami is not found between aws ami's.

Use Case(s)

I have 2 cases using same packer file:

  • the ami exists
  • the ami does not exits, and I want to fall back to hardcoded ami id.
    The current version of the plugin fails when the datasource doesn't find any ami by the given filters.

Potential References

Error example:
Error: Datasource.Execute failed: No AMI was found matching filters:

I will apply a PR for this one and mention it here.