Static IP Reservation in GCP

Hi all,
I am trying to create a simple code to reserve a static IP address in GCP so I can attach it to a cloud-nat that I am creating but the code I found wants me to use a module. Can somebody help me with that. I just need to reserve the static IP and get the value in an output and use it to create my cloud-nat.