fix: pipeline fixes
[skip ci]
This commit is contained in:
parent
eecf98f4b1
commit
8c490da5ce
6 changed files with 56 additions and 47 deletions
|
|
@ -76,7 +76,7 @@ func (r *userResource) Configure(ctx context.Context, req resource.ConfigureRequ
|
|||
return
|
||||
}
|
||||
r.client = apiClient
|
||||
tflog.Info(ctx, "SQLServer Beta Flex user client configured")
|
||||
tflog.Info(ctx, "SQLServer Alpha Flex user client configured")
|
||||
}
|
||||
|
||||
// ModifyPlan implements resource.ResourceWithModifyPlan.
|
||||
|
|
@ -206,12 +206,12 @@ func (r *userResource) Create(
|
|||
|
||||
ctx = core.InitProviderContext(ctx)
|
||||
|
||||
projectId := model.ProjectId.ValueString()
|
||||
instanceId := model.InstanceId.ValueString()
|
||||
projectID := model.ProjectId.ValueString()
|
||||
instanceID := model.InstanceId.ValueString()
|
||||
region := model.Region.ValueString()
|
||||
|
||||
ctx = tflog.SetField(ctx, "project_id", projectId)
|
||||
ctx = tflog.SetField(ctx, "instance_id", instanceId)
|
||||
ctx = tflog.SetField(ctx, "project_id", projectID)
|
||||
ctx = tflog.SetField(ctx, "instance_id", instanceID)
|
||||
ctx = tflog.SetField(ctx, "region", region)
|
||||
|
||||
var roles []string
|
||||
|
|
@ -234,9 +234,9 @@ func (r *userResource) Create(
|
|||
// Create new user
|
||||
userResp, err := r.client.DefaultAPI.CreateUserRequest(
|
||||
ctx,
|
||||
projectId,
|
||||
projectID,
|
||||
region,
|
||||
instanceId,
|
||||
instanceID,
|
||||
).CreateUserRequestPayload(*payload).Execute()
|
||||
if err != nil {
|
||||
core.LogAndAddError(ctx, &resp.Diagnostics, "Error creating user", fmt.Sprintf("Calling API: %v", err))
|
||||
|
|
@ -260,9 +260,9 @@ func (r *userResource) Create(
|
|||
|
||||
// Set data returned by API in identity
|
||||
identity := UserResourceIdentityModel{
|
||||
ProjectID: types.StringValue(projectId),
|
||||
ProjectID: types.StringValue(projectID),
|
||||
Region: types.StringValue(region),
|
||||
InstanceID: types.StringValue(instanceId),
|
||||
InstanceID: types.StringValue(instanceID),
|
||||
UserID: types.Int64Value(userId),
|
||||
}
|
||||
resp.Diagnostics.Append(resp.Identity.Set(ctx, identity)...)
|
||||
|
|
@ -284,8 +284,8 @@ func (r *userResource) Create(
|
|||
waitResp, err := sqlserverflexalphaWait.CreateUserWaitHandler(
|
||||
ctx,
|
||||
r.client.DefaultAPI,
|
||||
projectId,
|
||||
instanceId,
|
||||
projectID,
|
||||
instanceID,
|
||||
region,
|
||||
userId,
|
||||
).SetSleepBeforeWait(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue