diff --git a/castai/resource_aks_cluster.go b/castai/resource_aks_cluster.go index 92bd5a64..9b120266 100644 --- a/castai/resource_aks_cluster.go +++ b/castai/resource_aks_cluster.go @@ -2,6 +2,7 @@ package castai import ( "context" + "errors" "fmt" "log" "time" @@ -215,10 +216,15 @@ func updateAKSClusterSettings(ctx context.Context, data *schema.ResourceData, cl // Retries are required for newly created IAM resources to initialise on Azure side. b := backoff.WithContext(backoff.WithMaxRetries(backoff.NewConstantBackOff(10*time.Second), 30), ctx) + var lastErr error if err = backoff.Retry(func() error { response, err := client.ExternalClusterAPIUpdateClusterWithResponse(ctx, data.Id(), req) + lastErr = err return sdk.CheckOKResponse(response, err) }, b); err != nil { + if errors.Is(err, context.DeadlineExceeded) && lastErr != nil { + return fmt.Errorf("updating cluster configuration: %w: %v", err, lastErr) + } return fmt.Errorf("updating cluster configuration: %w", err) } diff --git a/castai/sdk/api.gen.go b/castai/sdk/api.gen.go index 00128e32..799ccd25 100644 --- a/castai/sdk/api.gen.go +++ b/castai/sdk/api.gen.go @@ -988,22 +988,6 @@ type CastaiSsoV1beta1UpdateSSOConnection struct { Okta *CastaiSsoV1beta1Okta `json:"okta,omitempty"` } -// CastaiUsersV1beta1AWSMarketplaceUser defines model for castai.users.v1beta1.AWSMarketplaceUser. -type CastaiUsersV1beta1AWSMarketplaceUser struct { - // CustomerAWSAccountId is Resolved using Registration token. - CustomerAwsAccountId *string `json:"customerAwsAccountId,omitempty"` - - // CustomerIdentifier is Resolved using Registration token. - CustomerIdentifier *string `json:"customerIdentifier,omitempty"` - - // ProductCode is Resolved using Registration token. - ProductCode *string `json:"productCode,omitempty"` - - // When a buyer visits your website during the registration process, the buyer - // submits a registration token through the browser. - RegistrationToken *string `json:"registrationToken,omitempty"` -} - // Defines the response for adding a user to an organization. type CastaiUsersV1beta1AddUserToOrganizationResponse = map[string]interface{} @@ -1055,20 +1039,6 @@ type CastaiUsersV1beta1DeleteInvitationResponse = map[string]interface{} // Defines the empty response to organization deletion. type CastaiUsersV1beta1DeleteOrganizationResponse = map[string]interface{} -// CastaiUsersV1beta1GCPMarketplaceUser defines model for castai.users.v1beta1.GCPMarketplaceUser. -type CastaiUsersV1beta1GCPMarketplaceUser struct { - // Google procurement account ID. - AccountId *string `json:"accountId,omitempty"` - - // Roles is an array of strings representing the user's roles. - // Right now, it can be either: account_admin, which indicates that the user is a Billing Account Administrator of the billing account that purchased the product, - // or ** project_editor, which indicates that the user is a Project Editor, but not a Billing Administrator, of the project under that billing account. - Roles *[]string `json:"roles,omitempty"` - - // User identity is the user's obfuscated GAIA ID, which can be used to initiate Open ID Connect. - UserIdentity *string `json:"userIdentity,omitempty"` -} - // Defines container for the organization's pending invitations. type CastaiUsersV1beta1ListInvitationsResponse struct { // Array of organization's pending invitations. @@ -1165,12 +1135,10 @@ type CastaiUsersV1beta1Request = map[string]interface{} // User represents a single system user. type CastaiUsersV1beta1User struct { // (optional) whether SSO auth provider label was provided as a separate JWT claim; used when login handler calls users service. - AuthProvider *string `json:"authProvider"` - AwsMarketplaceUser *CastaiUsersV1beta1AWSMarketplaceUser `json:"awsMarketplaceUser,omitempty"` + AuthProvider *string `json:"authProvider"` // (required) user email. - Email string `json:"email"` - GcpMarketplaceUser *CastaiUsersV1beta1GCPMarketplaceUser `json:"gcpMarketplaceUser,omitempty"` + Email string `json:"email"` // has_hubspot_contact indicates whether user has a hubspot contact. HasHubspotContact *bool `json:"hasHubspotContact,omitempty"` @@ -1900,6 +1868,9 @@ type NodeconfigV1GKEConfig struct { // Network tags to be added on a VM. Each tag must be 1-63 characters long, start with a lowercase letter and end with either a number or a lowercase letter. NetworkTags *[]string `json:"networkTags,omitempty"` + // Flag indicating whether to use local SSD storage for the node. Defaults to false. + UseEphemeralStorageLocalSsd *bool `json:"useEphemeralStorageLocalSsd,omitempty"` + // Zones is a preferred list of zones to choose from when adding a node. Zones *[]string `json:"zones,omitempty"` }