diff --git a/internal/provider/sys11dbaas_provider.go b/internal/provider/sys11dbaas_provider.go index c2ce7ce..96700b5 100644 --- a/internal/provider/sys11dbaas_provider.go +++ b/internal/provider/sys11dbaas_provider.go @@ -61,18 +61,18 @@ func (p *Sys11DBaaSProvider) Schema(_ context.Context, _ provider.SchemaRequest, Description: "URL of the DBaaS API. If omitted, the `SYS11DBAAS_URL` environment variable is used. Otherwise fallbacks to https://dbaas.apis.syseleven.de", }, "api_key": schema.StringAttribute{ - Required: true, - Optional: false, + Required: false, + Optional: true, Description: "API key to use for authentication to the DBaaS API. If omitted, the `SYS11DBAAS_API_KEY` environment variable is used.", }, "organization": schema.StringAttribute{ - Required: true, - Optional: false, + Required: false, + Optional: true, Description: "ID of your organization. If omitted, the `SYS11DBAAS_ORGANIZATION` environment variable is used.", }, "project": schema.StringAttribute{ - Required: true, - Optional: false, + Required: false, + Optional: true, Description: "ID of your project. If omitted, the `SYS11DBAAS_PROJECT` environment variable is used.", }, "wait_for_creation": schema.BoolAttribute{ @@ -194,8 +194,8 @@ func (p *Sys11DBaaSProvider) Configure(ctx context.Context, req provider.Configu resp.Diagnostics.AddAttributeError( path.Root("api_key"), "Missing Sys11DBaaS API ApiKey", - "The provider cannot create the Sys11DBaaS API client as there is a missing or empty value for the Sys11DBaaS API username. "+ - "Set the username value in the configuration or use the SYS11DBAAS_USERNAME environment variable. "+ + "The provider cannot create the Sys11DBaaS API client as there is a missing or empty value for the Sys11DBaaS API ApiKey. "+ + "Set the api_key value in the configuration or use the SYS11DBAAS_API_KEY environment variable. "+ "If either is already set, ensure the value is not empty.", ) } @@ -203,9 +203,9 @@ func (p *Sys11DBaaSProvider) Configure(ctx context.Context, req provider.Configu if organization == "" { resp.Diagnostics.AddAttributeError( path.Root("organization"), - "Missing Sys11DBaaS API ApiKey", - "The provider cannot create the Sys11DBaaS API client as there is a missing or empty value for the Sys11DBaaS API username. "+ - "Set the username value in the configuration or use the SYS11DBAAS_USERNAME environment variable. "+ + "Missing Sys11DBaaS organization", + "The provider cannot create the Sys11DBaaS API client as there is a missing or empty value for the Sys11DBaaS organization. "+ + "Set the organization value in the configuration or use the SYS11DBAAS_ORGANIZATION environment variable. "+ "If either is already set, ensure the value is not empty.", ) } @@ -213,9 +213,9 @@ func (p *Sys11DBaaSProvider) Configure(ctx context.Context, req provider.Configu if project == "" { resp.Diagnostics.AddAttributeError( path.Root("project"), - "Missing Sys11DBaaS API ApiKey", - "The provider cannot create the Sys11DBaaS API client as there is a missing or empty value for the Sys11DBaaS API username. "+ - "Set the username value in the configuration or use the SYS11DBAAS_USERNAME environment variable. "+ + "Missing Sys11DBaaS project", + "The provider cannot create the Sys11DBaaS API client as there is a missing or empty value for the Sys11DBaaS project. "+ + "Set the project value in the configuration or use the SYS11DBAAS_PROJECT environment variable. "+ "If either is already set, ensure the value is not empty.", ) } diff --git a/main.go b/main.go index 499b09d..8172b9a 100644 --- a/main.go +++ b/main.go @@ -39,8 +39,7 @@ func main() { flag.Parse() opts := providerserver.ServeOpts{ - // TODO: Update this string with the published name of your provider. - Address: "github.com/syseleven/terraform-provider-sys11dbaas", + Address: "registry.terraform.io/syseleven/sys11dbaas", Debug: debug, }