Skip to content

Commit

Permalink
fix: do not set field after writing (#132)
Browse files Browse the repository at this point in the history
* chore: readd deprecated resource for state migration

* fix: do not set var name after writing
  • Loading branch information
jonmorehouse authored May 19, 2024
1 parent 3156f95 commit d47ff8a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions internal/provider/component_container_image_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (r *ContainerImageComponentResource) Create(ctx context.Context, req resour
tflog.Trace(ctx, "got ID -- "+compResp.ID)
data.ID = types.StringValue(compResp.ID)
data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateExternalImageComponentConfigRequest{}
if data.AwsEcr != nil {
Expand Down Expand Up @@ -319,7 +319,7 @@ func (r *ContainerImageComponentResource) Update(ctx context.Context, req resour
return
}
data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateExternalImageComponentConfigRequest{}
if data.AwsEcr != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/component_docker_build_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (r *DockerBuildComponentResource) Create(ctx context.Context, req resource.
tflog.Trace(ctx, "got ID -- "+compResp.ID)
data.ID = types.StringValue(compResp.ID)
data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateDockerBuildComponentConfigRequest{
BuildArgs: []string{},
Expand Down Expand Up @@ -300,7 +300,7 @@ func (r *DockerBuildComponentResource) Update(ctx context.Context, req resource.
return
}
data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateDockerBuildComponentConfigRequest{
BuildArgs: []string{},
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/component_helm_chart_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (r *HelmChartComponentResource) Create(ctx context.Context, req resource.Cr
tflog.Trace(ctx, "got ID -- "+compResp.ID)
data.ID = types.StringValue(compResp.ID)
data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateHelmComponentConfigRequest{
ChartName: data.ChartName.ValueStringPointer(),
Expand Down Expand Up @@ -357,7 +357,7 @@ func (r *HelmChartComponentResource) Update(ctx context.Context, req resource.Up
return
}
data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateHelmComponentConfigRequest{
ChartName: data.ChartName.ValueStringPointer(),
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/component_job_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (r *JobComponentResource) Create(ctx context.Context, req resource.CreateRe
}
tflog.Trace(ctx, "got ID -- "+compResp.ID)
data.ID = types.StringValue(compResp.ID)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateJobComponentConfigRequest{
ImageURL: data.ImageURL.ValueStringPointer(),
Expand Down Expand Up @@ -273,7 +273,7 @@ func (r *JobComponentResource) Update(ctx context.Context, req resource.UpdateRe
}

data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateJobComponentConfigRequest{
ImageURL: data.ImageURL.ValueStringPointer(),
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/component_terraform_module_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (r *TerraformModuleComponentResource) Create(ctx context.Context, req resou
tflog.Trace(ctx, "got ID -- "+compResp.ID)
data.ID = types.StringValue(compResp.ID)
data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateTerraformModuleComponentConfigRequest{
ConnectedGithubVcsConfig: nil,
Expand Down Expand Up @@ -340,7 +340,7 @@ func (r *TerraformModuleComponentResource) Update(ctx context.Context, req resou
return
}
data.Name = types.StringValue(compResp.Name)
data.VarName = types.StringValue(compResp.VarName)
//data.VarName = types.StringValue(compResp.VarName)

configRequest := &models.ServiceCreateTerraformModuleComponentConfigRequest{
ConnectedGithubVcsConfig: nil,
Expand Down

0 comments on commit d47ff8a

Please sign in to comment.