Skip to content

Commit

Permalink
fix: Run make docs
Browse files Browse the repository at this point in the history
  • Loading branch information
YanniHu1996 committed Jun 29, 2023
1 parent 21dc00f commit 9b76e3f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/regions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ output "cloud_provider_id" {

### Required

- `cloud_provider` (String) Cloud provider to list the regions. For example, "aws" or "azure".
- `cloud_provider` (String) Cloud provider to list the regions. For example, "aws", "azure" or "bah:aws".
- `project_id` (String) BigAnimal Project ID.

### Optional
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/region.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ output "region_continent" {

### Required

- `cloud_provider` (String) Cloud provider. For example, "aws" or "azure".
- `cloud_provider` (String) Cloud provider. For example, "aws", "azure" or "bah:aws".
- `project_id` (String) BigAnimal Project ID.
- `region_id` (String) Region ID of the region. For example, "germanywestcentral" in the Azure cloud provider or "eu-west-1" in the AWS cloud provider.

Expand Down
24 changes: 12 additions & 12 deletions pkg/provider/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@ import (
sdkdiag "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
)

func fromBigAnimalErr(err error) diag.Diagnostics {
func fromBigAnimalErr(err error) sdkdiag.Diagnostics {
if err == nil {
return nil
}

var baError *api.BigAnimalError
if errors.As(err, &baError) {
return diag.Diagnostics{
diag.Diagnostic{
Severity: diag.Error,
return sdkdiag.Diagnostics{
sdkdiag.Diagnostic{
Severity: sdkdiag.Error,
Summary: baError.Error(),
Detail: baError.GetDetails(),
},
}
}
return diag.FromErr(err)
return sdkdiag.FromErr(err)
}

func unsupportedWarning(message string) diag.Diagnostics {
return diag.Diagnostics{
diag.Diagnostic{
Severity: diag.Warning,
func unsupportedWarning(message string) sdkdiag.Diagnostics {
return sdkdiag.Diagnostics{
sdkdiag.Diagnostic{
Severity: sdkdiag.Warning,
Summary: "Unsupported",
Detail: message,
},
}
}

func fromErr(err error, summary string, args ...any) diag2.Diagnostics {
func fromErr(err error, summary string, args ...any) frameworkdiag.Diagnostics {
summary = fmt.Sprintf(summary, args...)
return diag2.Diagnostics{
diag2.NewErrorDiagnostic(
return frameworkdiag.Diagnostics{
frameworkdiag.NewErrorDiagnostic(
summary, err.Error(),
),
}
Expand Down

0 comments on commit 9b76e3f

Please sign in to comment.