diff --git a/go.mod b/go.mod index 32c1088974..a580915ce7 100644 --- a/go.mod +++ b/go.mod @@ -35,8 +35,8 @@ require ( github.com/IBM/push-notifications-go-sdk v0.0.0-20210310100607-5790b96c47f5 github.com/IBM/sarama v1.41.2 github.com/IBM/scc-go-sdk/v5 v5.4.1 - github.com/IBM/schematics-go-sdk v0.2.3 - github.com/IBM/secrets-manager-go-sdk/v2 v2.0.5 + github.com/IBM/schematics-go-sdk v0.3.0 + github.com/IBM/secrets-manager-go-sdk/v2 v2.0.6 github.com/IBM/vmware-go-sdk v0.1.2 github.com/IBM/vpc-beta-go-sdk v0.6.0 github.com/IBM/vpc-go-sdk v0.58.0 diff --git a/go.sum b/go.sum index 279176668e..c512d5e897 100644 --- a/go.sum +++ b/go.sum @@ -183,8 +183,8 @@ github.com/IBM/sarama v1.41.2 h1:ZDBZfGPHAD4uuAtSv4U22fRZBgst0eEwGFzLj0fb85c= github.com/IBM/sarama v1.41.2/go.mod h1:xdpu7sd6OE1uxNdjYTSKUfY8FaKkJES9/+EyjSgiGQk= github.com/IBM/scc-go-sdk/v5 v5.4.1 h1:RXIuxOo9/hxkWyHCI69ae+KIJgSbXcAkJwTEl+fO3LQ= github.com/IBM/scc-go-sdk/v5 v5.4.1/go.mod h1:2xQTDgNXG5QMEfQxBDKB067z+5ha6OgcaKCTcdGDAo8= -github.com/IBM/schematics-go-sdk v0.2.3 h1:lgTt0Sbudii3cuSk1YSQgrtiZAXDbBABAoVj3eQuBrU= -github.com/IBM/schematics-go-sdk v0.2.3/go.mod h1:Tw2OSAPdpC69AxcwoyqcYYaGTTW6YpERF9uNEU+BFRQ= +github.com/IBM/schematics-go-sdk v0.3.0 h1:Vwxw85SONflakiBsNHAfViKLyp9zJiH5/hh6SewOP5Q= +github.com/IBM/schematics-go-sdk v0.3.0/go.mod h1:Tw2OSAPdpC69AxcwoyqcYYaGTTW6YpERF9uNEU+BFRQ= github.com/IBM/secrets-manager-go-sdk/v2 v2.0.6 h1:bF6bAdI4wDZSje6+Yx1mJxvirboxO+uMuKhzgfRCNxE= github.com/IBM/secrets-manager-go-sdk/v2 v2.0.6/go.mod h1:XWYnbcc5vN1RnKwk/fCzfD8aZd7At/Y1/b6c+oDyliU= github.com/IBM/vmware-go-sdk v0.1.2 h1:5lKWFyInWz9e2hwGsoFTEoLa1jYkD30SReN0fQ10w9M= diff --git a/ibm/service/schematics/data_source_ibm_schematics_job.go b/ibm/service/schematics/data_source_ibm_schematics_job.go index 663e3fa14b..64f35170d5 100644 --- a/ibm/service/schematics/data_source_ibm_schematics_job.go +++ b/ibm/service/schematics/data_source_ibm_schematics_job.go @@ -4212,7 +4212,7 @@ func dataSourceJobLogSummaryToMap(logSummaryItem schematicsv1.JobLogSummary) (lo return logSummaryMap } -func dataSourceJobLogSummaryLogErrorsToMap(logErrorsItem schematicsv1.JobLogSummaryLogErrorsItem) (logErrorsMap map[string]interface{}) { +func dataSourceJobLogSummaryLogErrorsToMap(logErrorsItem schematicsv1.JobLogSummaryLogErrors) (logErrorsMap map[string]interface{}) { logErrorsMap = map[string]interface{}{} if logErrorsItem.ErrorCode != nil { diff --git a/ibm/service/schematics/resource_ibm_schematics_agent.go b/ibm/service/schematics/resource_ibm_schematics_agent.go index 36f440553f..02843f1efd 100644 --- a/ibm/service/schematics/resource_ibm_schematics_agent.go +++ b/ibm/service/schematics/resource_ibm_schematics_agent.go @@ -900,7 +900,9 @@ func resourceIbmSchematicsAgentDelete(context context.Context, d *schema.Resourc return diag.FromErr(err) } - deleteAgentDataOptions := &schematicsv1.DeleteAgentDataOptions{} + deleteAgentDataOptions := &schematicsv1.DeleteAgentDataOptions{ + Force: core.BoolPtr(true), + } session, err := meta.(conns.ClientSession).BluemixSession() if err != nil { return diag.FromErr(err) diff --git a/ibm/service/schematics/resource_ibm_schematics_agent_test.go b/ibm/service/schematics/resource_ibm_schematics_agent_test.go index f5a4c6e646..3a2dd4384e 100644 --- a/ibm/service/schematics/resource_ibm_schematics_agent_test.go +++ b/ibm/service/schematics/resource_ibm_schematics_agent_test.go @@ -195,9 +195,7 @@ func testAccCheckIbmSchematicsAgentDestroy(s *terraform.State) error { // Try to find the key _, response, err := schematicsClient.GetAgentData(getAgentDataOptions) if err == nil { - return nil - // TODO: uncomment the following lines of code once the agent delete actually deletes agentdoc - // return fmt.Errorf("schematics_agent still exists: %s", rs.Primary.ID) + return fmt.Errorf("schematics_agent still exists: %s", rs.Primary.ID) } else if response.StatusCode != 404 { return fmt.Errorf("Error checking for schematics_agent (%s) has been destroyed: %s", rs.Primary.ID, err) } diff --git a/ibm/service/schematics/resource_ibm_schematics_job.go b/ibm/service/schematics/resource_ibm_schematics_job.go index b8927e5101..4893b8b7ae 100644 --- a/ibm/service/schematics/resource_ibm_schematics_job.go +++ b/ibm/service/schematics/resource_ibm_schematics_job.go @@ -3701,7 +3701,7 @@ func resourceIBMSchematicsJobMapToJobLogSummary(jobLogSummaryMap map[string]inte jobLogSummary.ElapsedTime = core.Float64Ptr(jobLogSummaryMap["elapsed_time"].(float64)) } if jobLogSummaryMap["log_errors"] != nil { - logErrors := []schematicsv1.JobLogSummaryLogErrorsItem{} + logErrors := []schematicsv1.JobLogSummaryLogErrors{} for _, logErrorsItem := range jobLogSummaryMap["log_errors"].([]interface{}) { logErrorsItemModel := resourceIBMSchematicsJobMapToJobLogSummaryLogErrors(logErrorsItem.(map[string]interface{})) logErrors = append(logErrors, logErrorsItemModel) @@ -3732,8 +3732,8 @@ func resourceIBMSchematicsJobMapToJobLogSummary(jobLogSummaryMap map[string]inte return jobLogSummary } -func resourceIBMSchematicsJobMapToJobLogSummaryLogErrors(jobLogSummaryLogErrorsMap map[string]interface{}) schematicsv1.JobLogSummaryLogErrorsItem { - jobLogSummaryLogErrors := schematicsv1.JobLogSummaryLogErrorsItem{} +func resourceIBMSchematicsJobMapToJobLogSummaryLogErrors(jobLogSummaryLogErrorsMap map[string]interface{}) schematicsv1.JobLogSummaryLogErrors { + jobLogSummaryLogErrors := schematicsv1.JobLogSummaryLogErrors{} if jobLogSummaryLogErrorsMap["error_code"] != nil { jobLogSummaryLogErrors.ErrorCode = core.StringPtr(jobLogSummaryLogErrorsMap["error_code"].(string)) @@ -4803,7 +4803,7 @@ func resourceIBMSchematicsJobJobLogSummaryToMap(jobLogSummary schematicsv1.JobLo return jobLogSummaryMap } -func resourceIBMSchematicsJobJobLogSummaryLogErrorsToMap(jobLogSummaryLogErrors schematicsv1.JobLogSummaryLogErrorsItem) map[string]interface{} { +func resourceIBMSchematicsJobJobLogSummaryLogErrorsToMap(jobLogSummaryLogErrors schematicsv1.JobLogSummaryLogErrors) map[string]interface{} { jobLogSummaryLogErrorsMap := map[string]interface{}{} if jobLogSummaryLogErrors.ErrorCode != nil { diff --git a/ibm/service/schematics/resource_ibm_schematics_workspace.go b/ibm/service/schematics/resource_ibm_schematics_workspace.go index 0853d0c7d6..bbd89ddf2f 100644 --- a/ibm/service/schematics/resource_ibm_schematics_workspace.go +++ b/ibm/service/schematics/resource_ibm_schematics_workspace.go @@ -581,7 +581,7 @@ func ResourceIBMSchematicsWorkspaceValidator() *validate.ResourceValidator { Identifier: schematicsWorkspaceTemplateType, ValidateFunctionIdentifier: validate.ValidateRegexp, Type: validate.TypeString, - Regexp: `^terraform_v(?:0\.11|0\.12|0\.13|0\.14|0\.15|1\.0|1\.1|1\.2|1\.3|1\.4|1\.5|1\.6)(?:\.\d+)?$`, + Regexp: `^terraform_v(?:1\.4|1\.5|1\.6|1\.7|1\.8|1\.9)(?:\.\d+)?$`, Default: "[]", Optional: true})