Ask Your Question

Revision history [back]

I read "User-data cannot change an instance’s network configuration" ( Think of it: To get cloud-config data, the instance uses the metadata API, therefore the network. It reads your network clause after networking is configured. Too late.

According to the above doc, you can only disable networking with a kernel parameter or by changing /etc/cloud/cloud.cfg.d on the instance.

Disclaimer: I am not a cloud-init expert, just an interested layman.