Need 12VDC power - only when ignition key is in lock (OFF)
Use a Single-Pole, Double-Throw (SPDT) 12V relay and connect your flashing LED to the normal-closed contact



simulate this circuit &ndash; Schematic created using CircuitLab
When the ignition is on, the relay pulls in, disconnecting the flashing circuit. When the ignition is off, the relay releases, connecting the flasher. This also does not pull any additional current when the ignition is off, reducing battery drain.
Please be sure to either connect to already fused circuits or add automotive fuses in-line with both feeds. Accidentally shorting a non-fused (or excessively high-current fused) connection to an auto battery is a way to really ruin your day!