Skip to content

Commit

Permalink
fix: addressed issue where integration is disabled when updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sheensantoscapadngan committed Jan 8, 2025
1 parent 6601b93 commit 9a7bb29
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/client/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@ type UpdateIntegrationRequest struct {
Owner string `json:"owner,omitempty"`
Environment string `json:"environment,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
IsActive bool `json:"isActive"`
IsActive bool `json:"isActive,omitempty"`
Region string `json:"region,omitempty"`
Path string `json:"path,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ func (r *IntegrationAWSParameterStoreResource) Update(ctx context.Context, req r
SecretPath: plan.SecretPath.ValueString(),
Region: plan.AWSRegion.ValueString(),
Path: plan.AWSPath.ValueString(),
IsActive: true,
})

if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/resource/integration_aws_secrets_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@ func (r *IntegrationAWSSecretsManagerResource) Update(ctx context.Context, req r
Environment: plan.Environment.ValueString(),
SecretPath: plan.SecretPath.ValueString(),
Region: plan.AWSRegion.ValueString(),
IsActive: true,
}

if plan.MappingBehavior.ValueString() == MAPPING_BEHAVIOR_MANY_TO_ONE {
updateIntegrationRequest.App = plan.AWSPath.ValueString()
}
Expand Down
1 change: 1 addition & 0 deletions internal/provider/resource/integration_circleci.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ func (r *IntegrationCircleCIResource) Update(ctx context.Context, req resource.U
App: plan.CircleCIProjectID.ValueString(), // Needs to be the project slug
AppID: plan.CircleCIProjectID.ValueString(), // Needs to be the project ID
Owner: plan.CircleCIOrgSlug.ValueString(), // Needs to be the organization slug
IsActive: true,
})

if err != nil {
Expand Down
1 change: 1 addition & 0 deletions internal/provider/resource/integration_databricks.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ func (r *IntegrationDatabricksResource) Update(ctx context.Context, req resource
Environment: plan.Environment.ValueString(),
SecretPath: plan.SecretPath.ValueString(),
App: plan.DatabricksSecretScope.ValueString(),
IsActive: true,
})

if err != nil {
Expand Down

0 comments on commit 9a7bb29

Please sign in to comment.