File tree Expand file tree Collapse file tree 2 files changed +10
-26
lines changed Expand file tree Collapse file tree 2 files changed +10
-26
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,6 @@ func (a *awsProvider) Validate() error {
176
176
}
177
177
178
178
func (a * awsProvider ) Configure (ctx context.Context , autoStack * auto.Stack ) error {
179
- if a .sc .Region != "" && autoStack != nil {
180
- return autoStack .SetConfig (ctx , "aws:region" , auto.ConfigValue {Value : a .sc .Region })
181
- }
182
-
183
179
dc , dok := a .sc .Config ["default" ]
184
180
185
181
for fn , f := range a .proj .Functions {
@@ -210,6 +206,10 @@ func (a *awsProvider) Configure(ctx context.Context, autoStack *auto.Stack) erro
210
206
a .proj .Functions [fn ] = f
211
207
}
212
208
209
+ if a .sc .Region != "" && autoStack != nil {
210
+ return autoStack .SetConfig (ctx , "aws:region" , auto.ConfigValue {Value : a .sc .Region })
211
+ }
212
+
213
213
return nil
214
214
}
215
215
Original file line number Diff line number Diff line change @@ -202,27 +202,6 @@ func (a *azureProvider) Validate() error {
202
202
}
203
203
204
204
func (a * azureProvider ) Configure (ctx context.Context , autoStack * auto.Stack ) error {
205
- if a .sc .Region != "" {
206
- err := autoStack .SetConfig (ctx , "azure:location" , auto.ConfigValue {Value : a .sc .Region })
207
- if err != nil {
208
- return err
209
- }
210
-
211
- err = autoStack .SetConfig (ctx , "azure-native:location" , auto.ConfigValue {Value : a .sc .Region })
212
- if err != nil {
213
- return err
214
- }
215
-
216
- return nil
217
- }
218
-
219
- region , err := autoStack .GetConfig (ctx , "azure-native:location" )
220
- if err != nil {
221
- return err
222
- }
223
-
224
- a .sc .Region = region .Value
225
-
226
205
dc , dok := a .sc .Config ["default" ]
227
206
228
207
for fn , f := range a .proj .Functions {
@@ -253,7 +232,12 @@ func (a *azureProvider) Configure(ctx context.Context, autoStack *auto.Stack) er
253
232
a .proj .Functions [fn ] = f
254
233
}
255
234
256
- return nil
235
+ err := autoStack .SetConfig (ctx , "azure:location" , auto.ConfigValue {Value : a .sc .Region })
236
+ if err != nil {
237
+ return err
238
+ }
239
+
240
+ return autoStack .SetConfig (ctx , "azure-native:location" , auto.ConfigValue {Value : a .sc .Region })
257
241
}
258
242
259
243
func (a * azureProvider ) Deploy (ctx * pulumi.Context ) error {
You can’t perform that action at this time.
0 commit comments