fortinet / fortigate-autoscale-gcp

A collection of Node.js modules and cloud specific templates which support basic autoscale functionality for groups of FortiGate VM instances via Google Cloud Functions
1 stars 7 forks source link

Alternative of using cloud function #26

Closed reddyskp closed 3 years ago

reddyskp commented 3 years ago

Hi All,

Is it necessary to use cloud function to invoke Fortinet startup scripts, instead can we do it directly with terraform data template file without storing them in storage bucket and invoking with cloud function?

Joel-Cripps commented 3 years ago

Not really. This setup involves having one of the FortiGates in the autoscale group as primary. So their are a couple of issues with removing the autoscale function code.

If you just want a static cluster that you control with terraform code you could do that, and repurpose some of this terraform code, But each would need to come up with the config you wanted

For instance, the following lines in the current baseconfig are dynamically generated by the function:

config system auto-scale
    set status enable
    set sync-interface "{SYNC_INTERFACE}"
    set hb-interval {HEART_BEAT_INTERVAL}
    set role master
    set callback-url {CALLBACK_URL}
    set psksecret {PSK_SECRET}
end
Joel-Cripps commented 3 years ago

I'm going to close this issue, feel free to open a new issue and reference this if you have questions.