Files
ubicloud/cli-commands/fw/post/attach-subnet.rb
Jeremy Evans ffc6e0f981 Allow fw attach-subnet cli to accept ps-name for ps-id
As the private subnet needs to be in the same location, there is
no need to specify the location on the command line.
2025-08-21 12:41:25 -07:00

15 lines
408 B
Ruby

# frozen_string_literal: true
UbiCli.on("fw").run_on("attach-subnet") do
desc "Attach a private subnet to a firewall"
banner "ubi fw (location/fw-name | fw-id) attach-subnet (ps-name | ps-id)"
args 1
run do |subnet_id|
id = sdk_object.attach_subnet(convert_name_to_id(sdk.private_subnet, subnet_id)).id
response("Attached private subnet #{subnet_id} to firewall with id #{id}")
end
end