V
V
VITYA-XY12020-06-26 17:40:59
Chef
VITYA-XY1, 2020-06-26 17:40:59

Chef GCP firewall how to set multiple ports?

gcompute_firewall 'test-fw-allow-ssh' do
  action :create
  allowed [
    {
      ip_protocol: 'tcp',
      ports: ['8081']  
    }
  ]
  target_tags [
    'instance-test'
  ]
  project ENV['GCP_PROJECT'] # ex: 'my-test-project'
  credential 'mycred'
end


1) How to set multiple ports?
So:
allowed                 [
    {
      ip_protocol string,
      ports       [
        string,
        ...
      ],
    },
    ...
  ]

2) Where can I find the dock for the gcompute_firewall resource?
Here: https://supermarket.chef.io/cookbooks/google-gcompute
3) I want to use chef as IaC is it worth it or is it customary to use other tools like teraform for this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question