Files
ubicloud/cli-commands/ps/post/connect.rb
Jeremy Evans 012c1c54d2 Allow ps connect cli to accept location/ps-name for ps-id
Private subnets are allowed to connect to private subnets in other
locations, so this requires the location be specified.
2025-08-21 12:41:25 -07:00

15 lines
388 B
Ruby

# frozen_string_literal: true
UbiCli.on("ps").run_on("connect") do
desc "Connect a private subnet to another private subnet"
banner "ubi ps (location/ps-name | ps-id) connect (location/ps-name | ps-id)"
args 1
run do |ps_id|
id = sdk_object.connect(convert_loc_name_to_id(sdk.private_subnet, ps_id)).id
response("Connected private subnet #{ps_id} to #{id}")
end
end