Skip to content

Commit

Permalink
Merge branch 'error_log' of https://github.com/prajwal-jarali/terrafo…
Browse files Browse the repository at this point in the history
…rm-provider-ibm into error_log
  • Loading branch information
prajwal-jarali committed Dec 4, 2024
2 parents f5cf2d9 + 0ea4491 commit 9e10c47
Show file tree
Hide file tree
Showing 15 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func dataSourceIbmAppConfigEnvironmentRead(d *schema.ResourceData, meta interfac

appconfigClient, err := getAppConfigClient(meta, guid)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetEnvironmentOptions{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func dataSourceIbmAppConfigEnvironmentsRead(d *schema.ResourceData, meta interfa

appconfigClient, err := getAppConfigClient(meta, guid)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.ListEnvironmentsOptions{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func dataSourceIbmAppConfigFeatureRead(d *schema.ResourceData, meta interface{})

appconfigClient, err := getAppConfigClient(meta, guid)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetFeatureOptions{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func dataSourceIbmAppConfigFeaturesRead(d *schema.ResourceData, meta interface{}

appconfigClient, err := getAppConfigClient(meta, guid)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.ListFeaturesOptions{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func dataSourceIbmAppConfigSegmentRead(d *schema.ResourceData, meta interface{})

appconfigClient, err := getAppConfigClient(meta, guid)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetSegmentOptions{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func testAccCheckIbmAppConfigCollectionExists(n string, obj appconfigurationv1.C
}
parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetCollectionOptions{}
Expand All @@ -93,7 +93,7 @@ func testAccCheckIbmAppConfigCollectionExists(n string, obj appconfigurationv1.C

result, _, err := appconfigClient.GetCollection(options)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

obj = *result
Expand All @@ -109,11 +109,11 @@ func testAccCheckIbmAppConfigCollectionDestroy(s *terraform.State) error {
}
parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.GetCollectionOptions{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func resourceEnvironmentCreate(d *schema.ResourceData, meta interface{}) error {
guid := d.Get("guid").(string)
appconfigClient, err := getAppConfigClient(meta, guid)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.CreateEnvironmentOptions{}

Expand Down Expand Up @@ -123,7 +123,7 @@ func resourceEnvironmentUpdate(d *schema.ResourceData, meta interface{}) error {
}
appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.UpdateEnvironmentOptions{}
Expand Down Expand Up @@ -156,7 +156,7 @@ func resourceEnvironmentRead(d *schema.ResourceData, meta interface{}) error {
}
appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetEnvironmentOptions{}
Expand Down Expand Up @@ -221,7 +221,7 @@ func resourceEnvironmentDelete(d *schema.ResourceData, meta interface{}) error {

appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.DeleteEnvironmentOptions{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,20 @@ func testAccCheckIbmAppConfigEnvironmentExists(n string, obj appconfigurationv1.

parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetEnvironmentOptions{}
options.SetEnvironmentID(parts[1])

result, _, err := appconfigClient.GetEnvironment(options)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

obj = *result
Expand All @@ -132,12 +132,12 @@ func testAccCheckIbmAppConfigEnvironmentDestroy(s *terraform.State) error {

parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.GetEnvironmentOptions{}
options.SetEnvironmentID(parts[1])
Expand Down
12 changes: 6 additions & 6 deletions ibm/service/appconfiguration/resource_ibm_app_config_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func resourceIbmIbmAppConfigFeatureCreate(d *schema.ResourceData, meta interface
guid := d.Get("guid").(string)
appconfigClient, err := getAppConfigClient(meta, guid)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.CreateFeatureOptions{}
options.SetType(d.Get("type").(string))
Expand Down Expand Up @@ -194,7 +194,7 @@ func resourceIbmIbmAppConfigFeatureCreate(d *schema.ResourceData, meta interface
value := e.(map[string]interface{})
segmentRulesItem, err := resourceIbmAppConfigFeatureMapToSegmentRule(d, value)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
segmentRules = append(segmentRules, segmentRulesItem)
}
Expand Down Expand Up @@ -226,7 +226,7 @@ func resourceIbmIbmAppConfigFeatureUpdate(d *schema.ResourceData, meta interface
}
appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.UpdateFeatureOptions{}
Expand All @@ -253,7 +253,7 @@ func resourceIbmIbmAppConfigFeatureUpdate(d *schema.ResourceData, meta interface
value := e.(map[string]interface{})
segmentRulesItem, err := resourceIbmAppConfigFeatureMapToSegmentRule(d, value)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
segmentRules = append(segmentRules, segmentRulesItem)
}
Expand Down Expand Up @@ -285,7 +285,7 @@ func resourceIbmIbmAppConfigFeatureRead(d *schema.ResourceData, meta interface{}
}
appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetFeatureOptions{}
Expand Down Expand Up @@ -417,7 +417,7 @@ func resourceIbmIbmAppConfigFeatureDelete(d *schema.ResourceData, meta interface
}
appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.DeleteFeatureOptions{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ func testAccCheckIbmAppConfigFeatureExists(n string, obj appconfigurationv1.Feat
}
parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetFeatureOptions{}
Expand All @@ -106,7 +106,7 @@ func testAccCheckIbmAppConfigFeatureExists(n string, obj appconfigurationv1.Feat

result, _, err := appconfigClient.GetFeature(options)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

obj = *result
Expand All @@ -122,11 +122,11 @@ func testAccCheckIbmAppConfigFeatureDestroy(s *terraform.State) error {
}
parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.GetFeatureOptions{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func resourceIbmIbmAppConfigPropertyCreate(d *schema.ResourceData, meta interfac
value := e.(map[string]interface{})
segmentRulesItem, err := resourceIbmAppConfigPropertyMapToSegmentRule(d, value)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
segmentRules = append(segmentRules, segmentRulesItem)
}
Expand Down Expand Up @@ -350,7 +350,7 @@ func resourceIbmIbmAppConfigPropertyUpdate(d *schema.ResourceData, meta interfac
value := e.(map[string]interface{})
segmentRulesItem, err := resourceIbmAppConfigPropertyMapToSegmentRule(d, value)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
segmentRules = append(segmentRules, segmentRulesItem)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ func testAccCheckIbmAppConfigPropertyExists(n string, obj appconfigurationv1.Pro

parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.GetPropertyOptions{}

Expand All @@ -104,7 +104,7 @@ func testAccCheckIbmAppConfigPropertyExists(n string, obj appconfigurationv1.Pro

property, _, err := appconfigClient.GetProperty(options)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

obj = *property
Expand All @@ -119,12 +119,12 @@ func testAccCheckIbmAppConfigPropertyDestroy(s *terraform.State) error {
}
parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.GetPropertyOptions{}

Expand Down
12 changes: 6 additions & 6 deletions ibm/service/appconfiguration/resource_ibm_app_config_segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func resourceIbmIbmAppConfigSegmentCreate(d *schema.ResourceData, meta interface
guid := d.Get("guid").(string)
appconfigClient, err := getAppConfigClient(meta, guid)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.CreateSegmentOptions{}
options.SetName(d.Get("name").(string))
Expand All @@ -111,7 +111,7 @@ func resourceIbmIbmAppConfigSegmentCreate(d *schema.ResourceData, meta interface
value := e.(map[string]interface{})
segmentRulesItem, err := resourceIbmAppConfigMapToSegmentRule(value)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
segmentRules = append(segmentRules, segmentRulesItem)
}
Expand Down Expand Up @@ -151,7 +151,7 @@ func resourceIbmIbmAppConfigSegmentRead(d *schema.ResourceData, meta interface{}

appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetSegmentOptions{}
Expand Down Expand Up @@ -234,7 +234,7 @@ func resourceIbmIbmAppConfigSegmentUpdate(d *schema.ResourceData, meta interface
}
appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.UpdateSegmentOptions{}

Expand All @@ -257,7 +257,7 @@ func resourceIbmIbmAppConfigSegmentUpdate(d *schema.ResourceData, meta interface
value := e.(map[string]interface{})
segmentRulesItem, err := resourceIbmAppConfigMapToSegmentRule(value)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
segmentRules = append(segmentRules, segmentRulesItem)
}
Expand All @@ -280,7 +280,7 @@ func resourceIbmIbmAppConfigSegmentDelete(d *schema.ResourceData, meta interface
}
appconfigClient, err := getAppConfigClient(meta, parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.DeleteSegmentOptions{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ func testAccCheckIbmAppConfigSegmentExists(n string, obj appconfigurationv1.Segm
}
parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

options := &appconfigurationv1.GetSegmentOptions{}
Expand All @@ -92,7 +92,7 @@ func testAccCheckIbmAppConfigSegmentExists(n string, obj appconfigurationv1.Segm

result, _, err := appconfigClient.GetSegment(options)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}

obj = *result
Expand All @@ -108,11 +108,11 @@ func testAccCheckIbmAppConfigSegmentDestroy(s *terraform.State) error {
}
parts, err := flex.IdParts(rs.Primary.ID)
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
appconfigClient, err := getAppConfigClient(acc.TestAccProvider.Meta(), parts[0])
if err != nil {
return flex.FmtErrorf(fmt.Sprintf("%s", err))
return err
}
options := &appconfigurationv1.GetSegmentOptions{}

Expand Down
Loading

0 comments on commit 9e10c47

Please sign in to comment.