and Iām spinning up an instance like this: lxc launch ubuntu:jammy my-test --profile default < ./config.yml
If I wanted to specify a different ip address though, how would I specify in the launch command without going in and editing the config file?
Your config file is using a macvlan NIC, which is connected to an external network parent enp3s0.
As such LXD cannot provide static DHCP allocations, and thus cannot control the IP the instance is given.
Instead you have passed cloud-init config to the instance, so it will self-configure its own static IP settings when cloud-init runs inside it at first start.
However if you want to change that IP without editing the config file then you will need to use some sort of templating system and pass that config file through a pre-processor step before passing it to lxc launch command.
This could be as simple as using something like awk to find and replace a placeholder in the file.