9
9
)
10
10
from scw_serverless .config .generators .terraform import TerraformGenerator
11
11
from scw_serverless .dependencies_manager import DependenciesManager
12
- from scw_serverless .deploy import backends , gateway
12
+ from scw_serverless .deploy import backends
13
13
from scw_serverless .logger import DEFAULT , get_logger
14
- from scw_serverless .utils .config import Config
15
14
from scw_serverless .utils .credentials import DEFAULT_REGION , get_scw_client
16
15
from scw_serverless .utils .loader import get_app_instance
17
16
@@ -84,18 +83,6 @@ def cli() -> None:
84
83
show_default = True ,
85
84
help = "Select the backend used to deploy" ,
86
85
)
87
- @click .option (
88
- "--gw-id" ,
89
- "-g" ,
90
- "gateway_id" ,
91
- envvar = "SCW_APIGW_ID" ,
92
- help = "API Gateway uuid to use with function endpoints" ,
93
- )
94
- @click .option (
95
- "--api-gw-host" ,
96
- envvar = "SCW_API_GW_HOST" ,
97
- help = "Host of the API to manage gateways" ,
98
- )
99
86
def deploy (
100
87
file : Path ,
101
88
backend : Literal ["api" , "serverless" ],
@@ -104,8 +91,6 @@ def deploy(
104
91
secret_key : Optional [str ] = None ,
105
92
project_id : Optional [str ] = None ,
106
93
region : Optional [str ] = None ,
107
- gateway_id : Optional [str ] = None ,
108
- api_gw_host : Optional [str ] = None ,
109
94
) -> None :
110
95
"""Deploy your functions to Scaleway.
111
96
@@ -138,28 +123,6 @@ def deploy(
138
123
139
124
deploy_backend .deploy ()
140
125
141
- needs_gateway = any (function .gateway_route for function in app_instance .functions )
142
- if not needs_gateway :
143
- return
144
- config = Config (api_gw_host , gateway_id ).update_from_config_file ()
145
- # If gateway_id is not configured, gateway_domains needs to be set
146
- is_gateway_configured = config .gateway_id or app_instance .gateway_domains
147
- if not is_gateway_configured :
148
- raise RuntimeError (
149
- "Deploying a routed functions requires a"
150
- + "gateway_id or a gateway_domain to be configured"
151
- )
152
- if not config .api_gw_host :
153
- raise RuntimeError ("No api gateway host was configured" )
154
- # Update the gateway
155
- manager = gateway .GatewayManager (
156
- app_instance ,
157
- client ,
158
- config .gateway_id ,
159
- gateway .GatewayClient (config .api_gw_host ),
160
- )
161
- manager .update_gateway_routes ()
162
-
163
126
164
127
@cli .command ()
165
128
@CLICK_ARG_FILE
0 commit comments