-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_spring_cloud_gateway
- split to create/update functions
#24116
azurerm_spring_cloud_gateway
- split to create/update functions
#24116
Conversation
existing, err := client.Get(ctx, id.ResourceGroup, id.SpringName, id.GatewayName) | ||
if err != nil { | ||
if !utils.ResponseWasNotFound(existing.Response) { | ||
return fmt.Errorf("checking for existing %s: %+v", id, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("checking for existing %s: %+v", id, err) | |
return fmt.Errorf("retrieving %s: %+v", id, err) |
if utils.ResponseWasNotFound(existing.Response) { | ||
return fmt.Errorf("retreiving %s: resource was not found", id) | ||
} | ||
|
||
if existing.Properties == nil { | ||
return fmt.Errorf("retreiving %s: properties was nil", id) | ||
} | ||
properties := existing.Properties | ||
|
||
if existing.Sku == nil { | ||
return fmt.Errorf("retreiving %s: sku was nil", id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retrieving is mispelled here
return fmt.Errorf("creating/updating %s: %+v", id, err) | ||
} | ||
|
||
if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { | ||
return fmt.Errorf("waiting for creation/update of %s: %+v", id, err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the error messages in the create as well
return fmt.Errorf("creating/updating %s: %+v", id, err) | |
} | |
if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { | |
return fmt.Errorf("waiting for creation/update of %s: %+v", id, err) | |
} | |
return fmt.Errorf("updating %s: %+v", id, err) | |
} | |
if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { | |
return fmt.Errorf("waiting for update of %s: %+v", id, err) | |
} |
Hi @stephybun , Thanks for the code review! I've updated this PR as suggested, please take another look. |
return fmt.Errorf("retreiving %s: resource was not found", id) | ||
} | ||
|
||
if existing.Properties == nil { | ||
return fmt.Errorf("retreiving %s: properties was nil", id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still misspelled here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ms-henglu LGTM 👍
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
No description provided.