diff --git a/internal/provider/assets_data_source.go b/internal/provider/assets_data_source.go index c91242e..a3ce1e9 100644 --- a/internal/provider/assets_data_source.go +++ b/internal/provider/assets_data_source.go @@ -165,7 +165,7 @@ func (d *assetsDataSource) Configure(ctx context.Context, req datasource.Configu if !ok { resp.Diagnostics.AddError( "Unexpected Data Source Configure Type", - fmt.Sprintf("Expected *mondoov1.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *mondoov1.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return diff --git a/internal/provider/custom_framework_resource.go b/internal/provider/custom_framework_resource.go index 1b19bab..19c8711 100644 --- a/internal/provider/custom_framework_resource.go +++ b/internal/provider/custom_framework_resource.go @@ -73,10 +73,10 @@ func (r *customFrameworkResource) getFrameworkContent(data customFrameworkResour func (r *customFrameworkResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: `Set custom Compliance Frameworks for a Mondoo Space.`, + MarkdownDescription: `Set custom compliance frameworks for a Mondoo space.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there's no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -84,14 +84,14 @@ func (r *customFrameworkResource) Schema(_ context.Context, _ resource.SchemaReq }, }, "mrn": schema.StringAttribute{ - MarkdownDescription: "Mondoo Resource Name.", + MarkdownDescription: "Mondoo resource name.", Computed: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.UseStateForUnknown(), }, }, "data_url": schema.StringAttribute{ - MarkdownDescription: "URL to the custom Compliance Framework data.", + MarkdownDescription: "URL to the custom compliance framework data.", Required: true, }, }, @@ -109,7 +109,7 @@ func (r *customFrameworkResource) Configure(_ context.Context, req resource.Conf if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -139,7 +139,7 @@ func (r *customFrameworkResource) Create(ctx context.Context, req resource.Creat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get Compliance Framework Content, got error: %s", err), + fmt.Sprintf("Unable to get compliance framework content. Got error: %s", err), ) return } @@ -150,7 +150,7 @@ func (r *customFrameworkResource) Create(ctx context.Context, req resource.Creat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to upload Compliance Framework, got error: %s", err), + fmt.Sprintf("Unable to upload compliance framework. Got error: %s", err), ) return } @@ -159,7 +159,7 @@ func (r *customFrameworkResource) Create(ctx context.Context, req resource.Creat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get Compliance Framework, got error: %s", err), + fmt.Sprintf("Unable to get compliance framework. Got error: %s", err), ) return } @@ -219,7 +219,7 @@ func (r *customFrameworkResource) Update(ctx context.Context, req resource.Updat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get Compliance Framework Content, got error: %s", err), + fmt.Sprintf("Unable to get compliance framework content. Got error: %s", err), ) return } @@ -230,7 +230,7 @@ func (r *customFrameworkResource) Update(ctx context.Context, req resource.Updat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to upload Compliance Framework, got error: %s", err), + fmt.Sprintf("Unable to upload compliance framework. Got error: %s", err), ) return } @@ -254,7 +254,7 @@ func (r *customFrameworkResource) Delete(ctx context.Context, req resource.Delet if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Compliance Framework, got error: %s", err), + fmt.Sprintf("Unable to delete compliance framework. Got error: %s", err), ) return } @@ -274,7 +274,7 @@ func (r *customFrameworkResource) ImportState(ctx context.Context, req resource. resp.Diagnostics.AddError( "Conflict Error", fmt.Sprintf( - "Unable to import integration, the provider is configured in a different space than the resource. (%s != %s)", + "Unable to import integration. The provider is configured in a different space than the resource. (%s != %s)", r.client.Space().ID(), spaceID), ) return @@ -284,7 +284,7 @@ func (r *customFrameworkResource) ImportState(ctx context.Context, req resource. if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get Compliance Framework, got error: %s", err), + fmt.Sprintf("Unable to get compliance framework. Got error: %s", err), ) return } diff --git a/internal/provider/custom_policy.go b/internal/provider/custom_policy.go index 7ad15d8..47baa95 100644 --- a/internal/provider/custom_policy.go +++ b/internal/provider/custom_policy.go @@ -60,7 +60,7 @@ func (r *customPolicyResource) Schema(ctx context.Context, req resource.SchemaRe MarkdownDescription: "Custom Policy resource", Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, }, "mrns": schema.ListAttribute{ @@ -120,7 +120,7 @@ func (r *customPolicyResource) Configure(ctx context.Context, req resource.Confi resp.Diagnostics.AddError( "Unexpected Resource Configure Type", fmt.Sprintf( - "Expected *http.Client, got: %T. Please report this issue to the provider developers.", + "Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData, ), ) @@ -201,7 +201,7 @@ func (r *customPolicyResource) Create(ctx context.Context, req resource.CreateRe if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to store policy, got error: %s", err), + fmt.Sprintf("Unable to store policy. Got error: %s", err), ) return } @@ -283,7 +283,7 @@ func (r *customPolicyResource) Update(ctx context.Context, req resource.UpdateRe if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to store policy, got error: %s", err), + fmt.Sprintf("Unable to store policy. Got error: %s", err), ) return } @@ -314,7 +314,7 @@ func (r *customPolicyResource) Delete(ctx context.Context, req resource.DeleteRe for _, policyMrn := range policyMrns { err := r.client.DeletePolicy(ctx, policyMrn) if err != nil { - resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to delete policy, got error: %s", err)) + resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to delete policy. Got error: %s", err)) return } } @@ -337,13 +337,13 @@ func (r *customPolicyResource) ImportState(ctx context.Context, req resource.Imp policy, err := r.client.GetPolicy(ctx, mrn, SpaceFrom(spaceID).MRN()) if err != nil { - resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to get policy, got error: %s", err)) + resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to get policy. Got error: %s", err)) return } content, err := r.client.DownloadBundle(ctx, string(policy.Mrn)) if err != nil { - resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to download bundle, got error: %s", err)) + resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to download bundle. Got error: %s", err)) return } diff --git a/internal/provider/custom_querypack.go b/internal/provider/custom_querypack.go index cfefd21..19f7e85 100644 --- a/internal/provider/custom_querypack.go +++ b/internal/provider/custom_querypack.go @@ -59,7 +59,7 @@ func (r *customQueryPackResource) Schema(_ context.Context, _ resource.SchemaReq MarkdownDescription: "Custom Query Pack resource", Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, }, "mrns": schema.ListAttribute{ @@ -118,7 +118,7 @@ func (r *customQueryPackResource) Configure(_ context.Context, req resource.Conf if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -189,7 +189,7 @@ func (r *customQueryPackResource) Create(ctx context.Context, req resource.Creat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to store policy, got error: %s", err), + fmt.Sprintf("Unable to store policy. Got error: %s", err), ) return } @@ -285,7 +285,7 @@ func (r *customQueryPackResource) Update(ctx context.Context, req resource.Updat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to store policy, got error: %s", err), + fmt.Sprintf("Unable to store policy. Got error: %s", err), ) return } @@ -318,7 +318,7 @@ func (r *customQueryPackResource) Delete(ctx context.Context, req resource.Delet if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete query pack, got error: %s", err), + fmt.Sprintf("Unable to delete query pack. Got error: %s", err), ) return } @@ -347,7 +347,7 @@ func (r *customQueryPackResource) ImportState(ctx context.Context, req resource. if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get policy, got error: %s", err), + fmt.Sprintf("Unable to get policy. Got error: %s", err), ) return } @@ -356,7 +356,7 @@ func (r *customQueryPackResource) ImportState(ctx context.Context, req resource. if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to download bundle, got error: %s", err), + fmt.Sprintf("Unable to download bundle. Got error: %s", err), ) return } diff --git a/internal/provider/exception_resource.go b/internal/provider/exception_resource.go index bd4179f..8720481 100644 --- a/internal/provider/exception_resource.go +++ b/internal/provider/exception_resource.go @@ -127,7 +127,7 @@ func NewValidUntilValidator() validator.String { func (r *exceptionResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: `Set custom exceptions for a Scope.`, + MarkdownDescription: `Set custom exceptions for a scope.`, Attributes: map[string]schema.Attribute{ "scope_mrn": schema.StringAttribute{ MarkdownDescription: "The MRN of the scope (either asset mrn or space mrn).", @@ -138,7 +138,7 @@ func (r *exceptionResource) Schema(ctx context.Context, req resource.SchemaReque }, }, "valid_until": schema.StringAttribute{ - MarkdownDescription: "The timestamp until the exception is valid.", + MarkdownDescription: "The date when the exception is no longer valid.", Optional: true, Validators: []validator.String{ stringvalidator.RegexMatches(regexp.MustCompile(`[1-9][0-9][0-9]{2}-([0][1-9]|[1][0-2])-([1-2][0-9]|[0][1-9]|[3][0-1])`), "Date must be in the format 'YYYY-MM-DD'"), @@ -150,7 +150,7 @@ func (r *exceptionResource) Schema(ctx context.Context, req resource.SchemaReque Optional: true, }, "action": schema.StringAttribute{ - MarkdownDescription: "The action to perform. Default is `SNOOZE`. Other options are `ENABLE`, `DISABLE`, `OUT_OF_SCOPE`.", + MarkdownDescription: "The action to perform. Default is `SNOOZE`. Other options are `ENABLE`, `DISABLE`, and `OUT_OF_SCOPE`.", Optional: true, Computed: true, Default: stringdefault.StaticString("SNOOZE"), @@ -195,7 +195,7 @@ func (r *exceptionResource) Configure(ctx context.Context, req resource.Configur if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return diff --git a/internal/provider/framework_assignment_resource.go b/internal/provider/framework_assignment_resource.go index 6a1f6f6..d170241 100644 --- a/internal/provider/framework_assignment_resource.go +++ b/internal/provider/framework_assignment_resource.go @@ -38,10 +38,10 @@ func (r *frameworkAssignmentResource) Metadata(_ context.Context, req resource.M func (r *frameworkAssignmentResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: `Set Compliance Frameworks for a Mondoo Space.`, + MarkdownDescription: `Set compliance frameworks for a Mondoo space.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there's no ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -49,12 +49,12 @@ func (r *frameworkAssignmentResource) Schema(_ context.Context, _ resource.Schem }, }, "framework_mrn": schema.ListAttribute{ - MarkdownDescription: "Compliance Framework MRN.", + MarkdownDescription: "Compliance framework MRN.", Required: true, ElementType: types.StringType, }, "enabled": schema.BoolAttribute{ - MarkdownDescription: "Enable or disable the Compliance Framework.", + MarkdownDescription: "Enable or disable the compliance framework.", Required: true, }, }, @@ -72,7 +72,7 @@ func (r *frameworkAssignmentResource) Configure(_ context.Context, req resource. if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -109,7 +109,7 @@ func (r *frameworkAssignmentResource) Create(ctx context.Context, req resource.C if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Compliance Framework, got error: %s", err), + fmt.Sprintf("Unable to create compliance framework. Got error: %s", err), ) return } @@ -172,7 +172,7 @@ func (r *frameworkAssignmentResource) Update(ctx context.Context, req resource.U if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Compliance Framework, got error: %s", err), + fmt.Sprintf("Unable to create compliance framework. Got error: %s", err), ) return } @@ -198,7 +198,7 @@ func (r *frameworkAssignmentResource) Delete(ctx context.Context, req resource.D if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Compliance Framework, got error: %s", err), + fmt.Sprintf("Unable to create compliance framework. Got error: %s", err), ) return } diff --git a/internal/provider/frameworks_data_source.go b/internal/provider/frameworks_data_source.go index f85500d..65b87d1 100644 --- a/internal/provider/frameworks_data_source.go +++ b/internal/provider/frameworks_data_source.go @@ -165,7 +165,7 @@ func (d *frameworksDataSource) Configure(ctx context.Context, req datasource.Con if !ok { resp.Diagnostics.AddError( "Unexpected Data Source Configure Type", - fmt.Sprintf("Expected *mondoov1.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *mondoov1.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return diff --git a/internal/provider/gql.go b/internal/provider/gql.go index 9058d61..c40c7f3 100644 --- a/internal/provider/gql.go +++ b/internal/provider/gql.go @@ -968,7 +968,7 @@ func (c *ExtendedGqlClient) ImportIntegration(ctx context.Context, req resource. if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get integration, got error: %s", err), + fmt.Sprintf("Unable to get integration. Got error: %s", err), ) return nil, false } diff --git a/internal/provider/integration_aws_resource.go b/internal/provider/integration_aws_resource.go index 8ef6ee4..90b90e3 100644 --- a/internal/provider/integration_aws_resource.go +++ b/internal/provider/integration_aws_resource.go @@ -93,7 +93,7 @@ func (r *integrationAwsResource) Schema(ctx context.Context, req resource.Schema MarkdownDescription: `Continuously scan AWS accounts for misconfigurations and vulnerabilities.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -178,7 +178,7 @@ func (r *integrationAwsResource) Configure(ctx context.Context, req resource.Con if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -217,7 +217,7 @@ func (r *integrationAwsResource) Create(ctx context.Context, req resource.Create if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create AWS integration, got error: %s", err), + fmt.Sprintf("Unable to create AWS integration. Got error: %s", err), ) return } @@ -271,7 +271,7 @@ func (r *integrationAwsResource) Update(ctx context.Context, req resource.Update if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update AWS integration, got error: %s", err), + fmt.Sprintf("Unable to update AWS integration. Got error: %s", err), ) return } @@ -295,7 +295,7 @@ func (r *integrationAwsResource) Delete(ctx context.Context, req resource.Delete if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete AWS integration, got error: %s", err), + fmt.Sprintf("Unable to delete AWS integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_aws_serverless_resource.go b/internal/provider/integration_aws_serverless_resource.go index 5e8b1fa..dbaf102 100644 --- a/internal/provider/integration_aws_serverless_resource.go +++ b/internal/provider/integration_aws_serverless_resource.go @@ -116,24 +116,24 @@ func (m integrationAwsServerlessResourceModel) GetConfigurationOptions() *mondoo eventScanTriggers = append(eventScanTriggers, &mondoov1.AWSEventPatternInput{ ScanType: mondoov1.String("ALL"), EventSource: mondoov1.String("aws.signin"), - EventDetailType: mondoov1.String("AWS Console Sign In via CloudTrail"), + EventDetailType: mondoov1.String("AWS Console Sign-in via CloudTrail"), }) eventScanTriggers = append(eventScanTriggers, &mondoov1.AWSEventPatternInput{ ScanType: mondoov1.String("ALL"), EventSource: mondoov1.String("aws.ec2"), - EventDetailType: mondoov1.String("EC2 Instance State-change Notification"), + EventDetailType: mondoov1.String("EC2 Instance State-Change Notification"), }) } else if m.ConsoleSignInTrigger.ValueBool() && !m.InstanceStateChangeTrigger.ValueBool() { eventScanTriggers = append(eventScanTriggers, &mondoov1.AWSEventPatternInput{ ScanType: mondoov1.String("ALL"), EventSource: mondoov1.String("aws.signin"), - EventDetailType: mondoov1.String("AWS Console Sign In via CloudTrail"), + EventDetailType: mondoov1.String("AWS Console Sign-in via CloudTrail"), }) } else if m.InstanceStateChangeTrigger.ValueBool() && !m.ConsoleSignInTrigger.ValueBool() { eventScanTriggers = append(eventScanTriggers, &mondoov1.AWSEventPatternInput{ ScanType: mondoov1.String("ALL"), EventSource: mondoov1.String("aws.ec2"), - EventDetailType: mondoov1.String("EC2 Instance State-change Notification"), + EventDetailType: mondoov1.String("EC2 Instance State-Change Notification"), }) } @@ -209,7 +209,7 @@ func (r *integrationAwsServerlessResource) Schema(ctx context.Context, req resou MarkdownDescription: `Continuously scan AWS organization and accounts for misconfigurations and vulnerabilities.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -239,7 +239,7 @@ func (r *integrationAwsServerlessResource) Schema(ctx context.Context, req resou Required: true, }, "console_sign_in_trigger": schema.BoolAttribute{ - MarkdownDescription: "Enable console sign in trigger.", + MarkdownDescription: "Enable console sign-in trigger.", Optional: true, }, "instance_state_change_trigger": schema.BoolAttribute{ @@ -311,7 +311,7 @@ func (r *integrationAwsServerlessResource) Schema(ctx context.Context, req resou ElementType: types.StringType, }, "exclude_tags_filter": schema.MapAttribute{ - MarkdownDescription: "Excluded Tags filter.", + MarkdownDescription: "Excluded tags filter.", Optional: true, ElementType: types.StringType, }, @@ -403,7 +403,7 @@ func (r *integrationAwsServerlessResource) Configure(ctx context.Context, req re if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -439,7 +439,7 @@ func (r *integrationAwsServerlessResource) Create(ctx context.Context, req resou if len(accountIDs) > 0 && data.IsOrganization.ValueBool() { resp.Diagnostics. AddError("ConflictingAttributesError", - "Cannot install CloudFormation Stack to both AWS organization and accounts.", + "Cannot install CloudFormation stack to both AWS organization and accounts.", ) return } @@ -455,7 +455,7 @@ func (r *integrationAwsServerlessResource) Create(ctx context.Context, req resou if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create AWS integration, got error: %s", err), + fmt.Sprintf("Unable to create AWS integration. Got error: %s", err), ) return } @@ -500,7 +500,7 @@ func (r *integrationAwsServerlessResource) Update(ctx context.Context, req resou if len(accountIDs) > 0 && data.IsOrganization.ValueBool() { resp.Diagnostics. AddError("ConflictingAttributesError", - "Cannot install CloudFormation Stack to both AWS organization and accounts.", + "Cannot install CloudFormation stack to both AWS organization and accounts.", ) return } @@ -523,7 +523,7 @@ func (r *integrationAwsServerlessResource) Update(ctx context.Context, req resou if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update AWS integration, got error: %s", err), + fmt.Sprintf("Unable to update AWS integration. Got error: %s", err), ) return } @@ -547,7 +547,7 @@ func (r *integrationAwsServerlessResource) Delete(ctx context.Context, req resou resp.Diagnostics. AddError("Client Error", fmt.Sprintf( - "Unable to delete AWS serverless integration '%s', got error: %s", + "Unable to delete AWS serverless integration '%s'. Got error: %s", data.Mrn.ValueString(), err.Error(), ), ) diff --git a/internal/provider/integration_azure_resource.go b/internal/provider/integration_azure_resource.go index ba7e1e0..80a3f60 100644 --- a/internal/provider/integration_azure_resource.go +++ b/internal/provider/integration_azure_resource.go @@ -54,10 +54,10 @@ func (r *integrationAzureResource) Metadata(ctx context.Context, req resource.Me func (r *integrationAzureResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: `Continuously scan Microsoft Azure subscriptions and resources for misconfigurations and vulnerabilities. See [Mondoo documentation](https://mondoo.com/docs/platform/infra/cloud/azure/azure-integration-scan-subscription/) for more details.`, + MarkdownDescription: `Continuously scan Microsoft Azure subscriptions and resources for misconfigurations and vulnerabilities. To learn more, read the [Mondoo documentation](https://mondoo.com/docs/platform/infra/cloud/azure/azure-integration-scan-subscription/).`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -79,11 +79,11 @@ func (r *integrationAzureResource) Schema(ctx context.Context, req resource.Sche }, }, "client_id": schema.StringAttribute{ - MarkdownDescription: "Azure Client ID.", + MarkdownDescription: "Azure client ID.", Required: true, }, "tenant_id": schema.StringAttribute{ - MarkdownDescription: "Azure Tenant ID.", + MarkdownDescription: "Azure tenant ID.", Required: true, }, "scan_vms": schema.BoolAttribute{ @@ -137,7 +137,7 @@ func (r *integrationAzureResource) Configure(ctx context.Context, req resource.C if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -177,7 +177,7 @@ func (r *integrationAzureResource) Create(ctx context.Context, req resource.Crea if len(listDeny) > 0 && len(listAllow) > 0 { resp.Diagnostics. AddError("ConflictingAttributesError", - "Both subscription_allow_list and subscription_deny_list cannot be provided simultaneously.", + "You can't provide both a subscription_allow_list and a subscription_deny_list. Choose one or the other.", ) return } @@ -200,7 +200,7 @@ func (r *integrationAzureResource) Create(ctx context.Context, req resource.Crea if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Azure integration, got error: %s", err), + fmt.Sprintf("Unable to create Azure integration. Got error: %s", err), ) return } @@ -211,7 +211,7 @@ func (r *integrationAzureResource) Create(ctx context.Context, req resource.Crea if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) return } @@ -264,7 +264,7 @@ func (r *integrationAzureResource) Update(ctx context.Context, req resource.Upda if len(listDeny) > 0 && len(listAllow) > 0 { resp.Diagnostics. AddError("ConflictingAttributesError", - "Both subscription_allow_list and subscription_deny_list cannot be provided simultaneously.", + "You can't provide both a subscription_allow_list and a subscription_deny_list. Choose one or the other.", ) return } @@ -289,7 +289,7 @@ func (r *integrationAzureResource) Update(ctx context.Context, req resource.Upda if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update Azure integration, got error: %s", err), + fmt.Sprintf("Unable to update Azure integration. Got error: %s", err), ) return } @@ -313,7 +313,7 @@ func (r *integrationAzureResource) Delete(ctx context.Context, req resource.Dele if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Azure integration, got error: %s", err), + fmt.Sprintf("Unable to delete Azure integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_domain_resource.go b/internal/provider/integration_domain_resource.go index d1af3ca..6fc5e24 100644 --- a/internal/provider/integration_domain_resource.go +++ b/internal/provider/integration_domain_resource.go @@ -46,7 +46,7 @@ func (r *integrationDomainResource) Schema(ctx context.Context, req resource.Sch MarkdownDescription: `Continuously scan endpoints to evaluate domain TLS, SSL, HTTP, and HTTPS security`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -93,7 +93,7 @@ func (r *integrationDomainResource) Configure(ctx context.Context, req resource. if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -137,7 +137,7 @@ func (r *integrationDomainResource) Create(ctx context.Context, req resource.Cre if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Domain integration, got error: %s", err), + fmt.Sprintf("Unable to create domain integration. Got error: %s", err), ) return } @@ -148,7 +148,7 @@ func (r *integrationDomainResource) Create(ctx context.Context, req resource.Cre if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) return } @@ -206,7 +206,7 @@ func (r *integrationDomainResource) Update(ctx context.Context, req resource.Upd if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update Domain integration, got error: %s", err), + fmt.Sprintf("Unable to update domain integration. Got error: %s", err), ) return } @@ -230,7 +230,7 @@ func (r *integrationDomainResource) Delete(ctx context.Context, req resource.Del if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Domain integration, got error: %s", err), + fmt.Sprintf("Unable to delete domain integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_email_resource.go b/internal/provider/integration_email_resource.go index 2e7c50b..5223e0a 100644 --- a/internal/provider/integration_email_resource.go +++ b/internal/provider/integration_email_resource.go @@ -200,10 +200,10 @@ func NewAutoCreateValidator() validator.Bool { func (r *integrationEmailResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: "Send an email to your ticket system, or any recipient.", + MarkdownDescription: "Send email to your ticket system or any recipient.", Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -244,11 +244,11 @@ func (r *integrationEmailResource) Schema(ctx context.Context, req resource.Sche }, }, "is_default": schema.BoolAttribute{ - MarkdownDescription: "Mark this recipient as default. This needs to be set if auto_create is enabled.", + MarkdownDescription: "Mark this recipient as default. This must be set if auto_create is enabled.", Optional: true, }, "reference_url": schema.StringAttribute{ - MarkdownDescription: "Reference URL for the recipient.", + MarkdownDescription: "Optional reference URL for the recipient.", Optional: true, }, }, @@ -283,7 +283,7 @@ func (r *integrationEmailResource) Configure(ctx context.Context, req resource.C if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -337,7 +337,7 @@ func (r *integrationEmailResource) Create(ctx context.Context, req resource.Crea if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Email integration, got error: %s", err), + fmt.Sprintf("Unable to create email integration. Got error: %s", err), ) return } @@ -391,7 +391,7 @@ func (r *integrationEmailResource) Update(ctx context.Context, req resource.Upda if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update Email integration, got error: %s", err), + fmt.Sprintf("Unable to update email integration. Got error: %s", err), ) return } @@ -415,7 +415,7 @@ func (r *integrationEmailResource) Delete(ctx context.Context, req resource.Dele if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Email integration, got error: %s", err), + fmt.Sprintf("Unable to delete email integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_gcp_resource.go b/internal/provider/integration_gcp_resource.go index 9a8b31e..be59e3c 100644 --- a/internal/provider/integration_gcp_resource.go +++ b/internal/provider/integration_gcp_resource.go @@ -51,10 +51,10 @@ func (r *integrationGcpResource) Metadata(ctx context.Context, req resource.Meta func (r *integrationGcpResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: `Continuously scan Google GCP organizations and projects for misconfigurations and vulnerabilities.`, + MarkdownDescription: `Continuously scan GCP organizations and projects for misconfigurations and vulnerabilities.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -76,7 +76,7 @@ func (r *integrationGcpResource) Schema(ctx context.Context, req resource.Schema }, }, "project_id": schema.StringAttribute{ - MarkdownDescription: "GCP project id", + MarkdownDescription: "GCP project ID", Optional: true, }, "credentials": schema.SingleNestedAttribute{ @@ -103,7 +103,7 @@ func (r *integrationGcpResource) Configure(ctx context.Context, req resource.Con if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -146,7 +146,7 @@ func (r *integrationGcpResource) Create(ctx context.Context, req resource.Create if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create GCP integration, got error: %s", err), + fmt.Sprintf("Unable to create GCP integration. Got error: %s", err), ) return } @@ -157,7 +157,7 @@ func (r *integrationGcpResource) Create(ctx context.Context, req resource.Create if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) return } @@ -215,7 +215,7 @@ func (r *integrationGcpResource) Update(ctx context.Context, req resource.Update if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update Gcp integration, got error: %s", err), + fmt.Sprintf("Unable to update GCP integration. Got error: %s", err), ) return } @@ -239,7 +239,7 @@ func (r *integrationGcpResource) Delete(ctx context.Context, req resource.Delete if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Gcp integration, got error: %s", err), + fmt.Sprintf("Unable to delete GCP integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_github_resource.go b/internal/provider/integration_github_resource.go index c37c7e8..d095bd3 100644 --- a/internal/provider/integration_github_resource.go +++ b/internal/provider/integration_github_resource.go @@ -93,7 +93,7 @@ func (r *integrationGithubResource) Schema(ctx context.Context, req resource.Sch MarkdownDescription: `Continuously scan GitHub organizations and repositories for misconfigurations.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -115,11 +115,11 @@ func (r *integrationGithubResource) Schema(ctx context.Context, req resource.Sch }, }, "owner": schema.StringAttribute{ - MarkdownDescription: "GitHub Owner.", + MarkdownDescription: "GitHub owner.", Required: true, }, "repository": schema.StringAttribute{ - MarkdownDescription: "GitHub Repository.", + MarkdownDescription: "GitHub repository.", Optional: true, }, "repository_allow_list": schema.ListAttribute{ @@ -154,7 +154,7 @@ func (r *integrationGithubResource) Schema(ctx context.Context, req resource.Sch Validators: []validator.String{ stringvalidator.RegexMatches( regexp.MustCompile(`^(ghp_[a-zA-Z0-9]{36}|github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59})$`), - "must be a valid classic GitHub Token with 40 characters in length, with a prefix of ghp_ or a fine-grained GitHub token with 93 characters in length, with a prefix of github_pat_", + "must be a valid classic GitHub token with 40 characters in length, with a prefix of ghp_ or a fine-grained GitHub token with 93 characters in length, with a prefix of github_pat_", ), }, }, @@ -175,7 +175,7 @@ func (r *integrationGithubResource) Configure(ctx context.Context, req resource. if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -214,7 +214,7 @@ func (r *integrationGithubResource) Create(ctx context.Context, req resource.Cre if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Domain integration, got error: %s", err), + fmt.Sprintf("Unable to create GitHub integration. Got error: %s", err), ) return } @@ -225,7 +225,7 @@ func (r *integrationGithubResource) Create(ctx context.Context, req resource.Cre if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) return } @@ -279,7 +279,7 @@ func (r *integrationGithubResource) Update(ctx context.Context, req resource.Upd if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update Domain integration, got error: %s", err), + fmt.Sprintf("Unable to update GitHub integration. Got error: %s", err), ) return } @@ -303,7 +303,7 @@ func (r *integrationGithubResource) Delete(ctx context.Context, req resource.Del if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Domain integration, got error: %s", err), + fmt.Sprintf("Unable to delete GitHub integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_gitlab_resource.go b/internal/provider/integration_gitlab_resource.go index 4f2baae..a317307 100644 --- a/internal/provider/integration_gitlab_resource.go +++ b/internal/provider/integration_gitlab_resource.go @@ -88,7 +88,7 @@ func (r *integrationGitlabResource) Schema(ctx context.Context, req resource.Sch MarkdownDescription: `Continuously scan GitLab for misconfigurations.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -169,7 +169,7 @@ func (r *integrationGitlabResource) Configure(ctx context.Context, req resource. if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -208,7 +208,7 @@ func (r *integrationGitlabResource) Create(ctx context.Context, req resource.Cre if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create GitLab integration, got error: %s", err), + fmt.Sprintf("Unable to create GitLab integration. Got error: %s", err), ) return } @@ -219,7 +219,7 @@ func (r *integrationGitlabResource) Create(ctx context.Context, req resource.Cre if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) return } @@ -272,7 +272,7 @@ func (r *integrationGitlabResource) Update(ctx context.Context, req resource.Upd if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update GitLab integration, got error: %s", err), + fmt.Sprintf("Unable to update GitLab integration. Got error: %s", err), ) return } @@ -296,7 +296,7 @@ func (r *integrationGitlabResource) Delete(ctx context.Context, req resource.Del if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete GitLab integration, got error: %s", err), + fmt.Sprintf("Unable to delete GitLab integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_jira_resource.go b/internal/provider/integration_jira_resource.go index 6455a79..0642256 100644 --- a/internal/provider/integration_jira_resource.go +++ b/internal/provider/integration_jira_resource.go @@ -67,10 +67,10 @@ func (m integrationJiraResourceModel) GetConfigurationOptions() *mondoov1.JiraCo func (r *integrationJiraResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: `Integrate the Ticketing System Jira with Mondoo to automatically create and close issues based on Mondoo findings.`, + MarkdownDescription: `Integrate the Jira ticket system with Mondoo to automatically create and close Jira issues based on Mondoo findings.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -112,7 +112,7 @@ func (r *integrationJiraResource) Schema(ctx context.Context, req resource.Schem }, }, "default_project": schema.StringAttribute{ - MarkdownDescription: "Default Jira project (is represented by the project key e.g. `MONDOO`).", + MarkdownDescription: "Default Jira project (represented by the project key, such as `SEC` or `SECURITY`).", Optional: true, }, "auto_create": schema.BoolAttribute{ @@ -148,7 +148,7 @@ func (r *integrationJiraResource) Configure(ctx context.Context, req resource.Co if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -187,7 +187,7 @@ func (r *integrationJiraResource) Create(ctx context.Context, req resource.Creat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Jira integration, got error: %s", err), + fmt.Sprintf("Unable to create Jira integration. Got error: %s", err), ) return } @@ -241,7 +241,7 @@ func (r *integrationJiraResource) Update(ctx context.Context, req resource.Updat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update Jira integration, got error: %s", err), + fmt.Sprintf("Unable to update Jira integration. Got error: %s", err), ) return } @@ -265,7 +265,7 @@ func (r *integrationJiraResource) Delete(ctx context.Context, req resource.Delet if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Jira integration, got error: %s", err), + fmt.Sprintf("Unable to delete Jira integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_ms365_resource.go b/internal/provider/integration_ms365_resource.go index 6b98012..3c4317c 100644 --- a/internal/provider/integration_ms365_resource.go +++ b/internal/provider/integration_ms365_resource.go @@ -50,10 +50,10 @@ func (r *integrationMs365Resource) Metadata(ctx context.Context, req resource.Me func (r *integrationMs365Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: `Continuously monitor your Microsoft 365 resources for misconfigurations and vulnerabilities. See [Mondoo documentation](https://mondoo.com/docs/platform/infra/saas/ms365/ms365-auto/) for more details.`, + MarkdownDescription: `Continuously monitor your Microsoft 365 resources for misconfigurations and vulnerabilities. To learn more, read the [Mondoo documentation](https://mondoo.com/docs/platform/infra/saas/ms365/ms365-auto/).`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -75,18 +75,18 @@ func (r *integrationMs365Resource) Schema(ctx context.Context, req resource.Sche }, }, "client_id": schema.StringAttribute{ - MarkdownDescription: "Azure Client ID.", + MarkdownDescription: "Azure client ID.", Required: true, }, "tenant_id": schema.StringAttribute{ - MarkdownDescription: "Azure Tenant ID.", + MarkdownDescription: "Azure tenant ID.", Required: true, }, "credentials": schema.SingleNestedAttribute{ Required: true, Attributes: map[string]schema.Attribute{ "pem_file": schema.StringAttribute{ - MarkdownDescription: "PEM file for Ms365 integration.", + MarkdownDescription: "PEM file for MS365 integration.", Required: true, Sensitive: true, }, @@ -107,7 +107,7 @@ func (r *integrationMs365Resource) Configure(ctx context.Context, req resource.C if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -150,7 +150,7 @@ func (r *integrationMs365Resource) Create(ctx context.Context, req resource.Crea if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create MS365 integration, got error: %s", err), + fmt.Sprintf("Unable to create MS365 integration. Got error: %s", err), ) return } @@ -161,7 +161,7 @@ func (r *integrationMs365Resource) Create(ctx context.Context, req resource.Crea if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) return } @@ -219,7 +219,7 @@ func (r *integrationMs365Resource) Update(ctx context.Context, req resource.Upda if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update Ms365 integration, got error: %s", err), + fmt.Sprintf("Unable to update MS365 integration. Got error: %s", err), ) return } @@ -243,7 +243,7 @@ func (r *integrationMs365Resource) Delete(ctx context.Context, req resource.Dele if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Ms365 integration, got error: %s", err), + fmt.Sprintf("Unable to delete MS365 integration. Got error: %s", err), ) return } @@ -255,7 +255,7 @@ func (r *integrationMs365Resource) ImportState(ctx context.Context, req resource if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get integration, got error: %s", err), + fmt.Sprintf("Unable to get integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_msdefender_resource.go b/internal/provider/integration_msdefender_resource.go index 398f098..ae574b3 100644 --- a/internal/provider/integration_msdefender_resource.go +++ b/internal/provider/integration_msdefender_resource.go @@ -78,7 +78,7 @@ func (r *integrationMsDefenderResource) Schema(ctx context.Context, req resource MarkdownDescription: "Microsoft Defender for Cloud integration.", Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -100,15 +100,15 @@ func (r *integrationMsDefenderResource) Schema(ctx context.Context, req resource }, }, "client_id": schema.StringAttribute{ - MarkdownDescription: "Azure Client ID.", + MarkdownDescription: "Azure client ID.", Required: true, }, "tenant_id": schema.StringAttribute{ - MarkdownDescription: "Azure Tenant ID.", + MarkdownDescription: "Azure tenant ID.", Required: true, }, "subscription_allow_list": schema.ListAttribute{ - MarkdownDescription: "List of Azure subscriptions to scan.", + MarkdownDescription: "List of Azure subscriptions from which to import Defender data.", Optional: true, ElementType: types.StringType, Validators: []validator.List{ @@ -119,7 +119,7 @@ func (r *integrationMsDefenderResource) Schema(ctx context.Context, req resource }, }, "subscription_deny_list": schema.ListAttribute{ - MarkdownDescription: "List of Azure subscriptions to exclude from scanning.", + MarkdownDescription: "List of Azure subscriptions to exclude from imports.", Optional: true, ElementType: types.StringType, Validators: []validator.List{ @@ -154,7 +154,7 @@ func (r *integrationMsDefenderResource) Configure(ctx context.Context, req resou if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -192,7 +192,7 @@ func (r *integrationMsDefenderResource) Create(ctx context.Context, req resource if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create MsDefender integration, got error: %s", err), + fmt.Sprintf("Unable to create MS Defender integration. Got error: %s", err), ) return } @@ -203,7 +203,7 @@ func (r *integrationMsDefenderResource) Create(ctx context.Context, req resource if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) } @@ -256,7 +256,7 @@ func (r *integrationMsDefenderResource) Update(ctx context.Context, req resource if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update MsDefender integration, got error: %s", err), + fmt.Sprintf("Unable to update MS Defender integration. Got error: %s", err), ) return } @@ -280,7 +280,7 @@ func (r *integrationMsDefenderResource) Delete(ctx context.Context, req resource if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete MsDefender integration, got error: %s", err), + fmt.Sprintf("Unable to delete MS Defender integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_oci_tenant.go b/internal/provider/integration_oci_tenant.go index 776d79c..009fc24 100644 --- a/internal/provider/integration_oci_tenant.go +++ b/internal/provider/integration_oci_tenant.go @@ -60,11 +60,11 @@ func (r *integrationOciTenantResource) Metadata(ctx context.Context, req resourc func (r *integrationOciTenantResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ // This description is used by the documentation generator and the language server. - MarkdownDescription: "Example resource", + MarkdownDescription: "Continuously monitor OCI tenancies and resources for misconfigurations and vulnerabilities.", Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -124,7 +124,7 @@ func (r *integrationOciTenantResource) Configure(ctx context.Context, req resour if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -169,7 +169,7 @@ func (r *integrationOciTenantResource) Create(ctx context.Context, req resource. if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create OCI tenant integration, got error: %s", err), + fmt.Sprintf("Unable to create OCI integration. Got error: %s", err), ) return } @@ -180,7 +180,7 @@ func (r *integrationOciTenantResource) Create(ctx context.Context, req resource. if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) return } @@ -205,7 +205,7 @@ func (r *integrationOciTenantResource) Read(ctx context.Context, req resource.Re } // Write logs using the tflog package - tflog.Trace(ctx, "read a OCI integration resource") + tflog.Trace(ctx, "read an OCI integration resource") // Save updated data into Terraform state resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) @@ -241,7 +241,7 @@ func (r *integrationOciTenantResource) Update(ctx context.Context, req resource. if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update OCI tenant integration, got error: %s", err), + fmt.Sprintf("Unable to update OCI integration. Got error: %s", err), ) return } @@ -265,7 +265,7 @@ func (r *integrationOciTenantResource) Delete(ctx context.Context, req resource. if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Oci tenant integration, got error: %s", err), + fmt.Sprintf("Unable to delete OCI integration. Got error: %s", err), ) return } @@ -277,7 +277,7 @@ func (r *integrationOciTenantResource) ImportState(ctx context.Context, req reso if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get integration, got error: %s", err), + fmt.Sprintf("Unable to get integration. Got error: %s", err), ) return } @@ -289,7 +289,7 @@ func (r *integrationOciTenantResource) ImportState(ctx context.Context, req reso resp.Diagnostics.AddError( "Conflict Error", fmt.Sprintf( - "Unable to import integration, the provider is configured in a different space than the resource. (%s != %s)", + "Unable to import integration. The provider is configured in a different space than the resource. (%s != %s)", r.client.Space().ID(), spaceID), ) return diff --git a/internal/provider/integration_shodan_resource.go b/internal/provider/integration_shodan_resource.go index 397a6e2..0c2bff9 100644 --- a/internal/provider/integration_shodan_resource.go +++ b/internal/provider/integration_shodan_resource.go @@ -57,7 +57,7 @@ func (r *integrationShodanResource) Schema(_ context.Context, _ resource.SchemaR MarkdownDescription: `Continuously assess external risk for domains and IP addresses.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -113,7 +113,7 @@ func (r *integrationShodanResource) Configure(ctx context.Context, req resource. Diagnostics. AddError("Unexpected Resource Configure Type", fmt.Sprintf( - "Expected *http.Client, got: %T. Please report this issue to the provider developers.", + "Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData, ), ) @@ -162,7 +162,7 @@ func (r *integrationShodanResource) Create(ctx context.Context, req resource.Cre Diagnostics. AddError("Client Error", fmt.Sprintf( - "Unable to create integration, got error: %s", err, + "Unable to create integration. Got error: %s", err, ), ) return @@ -178,7 +178,7 @@ func (r *integrationShodanResource) Create(ctx context.Context, req resource.Cre Diagnostics. AddWarning("Client Error", fmt.Sprintf( - "Unable to trigger integration, got error: %s", err, + "Unable to trigger integration. Got error: %s", err, ), ) return @@ -239,7 +239,7 @@ func (r *integrationShodanResource) Update(ctx context.Context, req resource.Upd Diagnostics. AddError("Client Error", fmt.Sprintf( - "Unable to update Domain integration, got error: %s", err, + "Unable to update Shodan integration. Got error: %s", err, ), ) return @@ -266,7 +266,7 @@ func (r *integrationShodanResource) Delete(ctx context.Context, req resource.Del Diagnostics. AddError("Client Error", fmt.Sprintf( - "Unable to delete Domain integration, got error: %s", err, + "Unable to delete Shodan integration. Got error: %s", err, ), ) return @@ -279,7 +279,7 @@ func (r *integrationShodanResource) ImportState(ctx context.Context, req resourc if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to get integration, got error: %s", err), + fmt.Sprintf("Unable to get integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_slack_resource.go b/internal/provider/integration_slack_resource.go index e4f22a9..753375c 100644 --- a/internal/provider/integration_slack_resource.go +++ b/internal/provider/integration_slack_resource.go @@ -44,10 +44,10 @@ func (r *integrationSlackResource) Metadata(ctx context.Context, req resource.Me func (r *integrationSlackResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: "Continuously scan your Slack Teams for security misconfigurations.", + MarkdownDescription: "Continuously scan your Slack teams for security misconfigurations.", Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -94,7 +94,7 @@ func (r *integrationSlackResource) Configure(ctx context.Context, req resource.C if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -135,7 +135,7 @@ func (r *integrationSlackResource) Create(ctx context.Context, req resource.Crea if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Slack integration, got error: %s", err), + fmt.Sprintf("Unable to create Slack integration. Got error: %s", err), ) return } @@ -146,7 +146,7 @@ func (r *integrationSlackResource) Create(ctx context.Context, req resource.Crea if err != nil { resp.Diagnostics. AddWarning("Client Error", - fmt.Sprintf("Unable to trigger integration, got error: %s", err), + fmt.Sprintf("Unable to trigger integration. Got error: %s", err), ) return } @@ -203,7 +203,7 @@ func (r *integrationSlackResource) Update(ctx context.Context, req resource.Upda if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update OCI tenant integration, got error: %s", err), + fmt.Sprintf("Unable to update Slack tenant integration. Got error: %s", err), ) return } @@ -227,7 +227,7 @@ func (r *integrationSlackResource) Delete(ctx context.Context, req resource.Dele if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Slack integration, got error: %s", err), + fmt.Sprintf("Unable to delete Slack integration. Got error: %s", err), ) return } diff --git a/internal/provider/integration_zendesk_resource.go b/internal/provider/integration_zendesk_resource.go index e31823b..66bea49 100644 --- a/internal/provider/integration_zendesk_resource.go +++ b/internal/provider/integration_zendesk_resource.go @@ -76,7 +76,7 @@ func (r *integrationZendeskResource) Schema(ctx context.Context, req resource.Sc MarkdownDescription: `Zendesk integration to keep track of security tasks and add Zendesk tickets directly from within the Mondoo Console.`, Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -120,7 +120,7 @@ func (r *integrationZendeskResource) Schema(ctx context.Context, req resource.Sc Optional: true, }, "custom_fields": schema.ListNestedAttribute{ - MarkdownDescription: "Custom fields to be added to the Zendesk ticket.", + MarkdownDescription: "Custom fields to add to the Zendesk ticket.", Optional: true, NestedObject: schema.NestedAttributeObject{ Attributes: map[string]schema.Attribute{ @@ -139,7 +139,7 @@ func (r *integrationZendeskResource) Schema(ctx context.Context, req resource.Sc Required: true, Attributes: map[string]schema.Attribute{ "token": schema.StringAttribute{ - MarkdownDescription: "Token for GitHub integration.", + MarkdownDescription: "Token for Zendesk integration.", Required: true, Sensitive: true, }, @@ -160,7 +160,7 @@ func (r *integrationZendeskResource) Configure(ctx context.Context, req resource if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -213,7 +213,7 @@ func (r *integrationZendeskResource) Create(ctx context.Context, req resource.Cr if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create Zendesk integration, got error: %s", err), + fmt.Sprintf("Unable to create Zendesk integration. Got error: %s", err), ) return } @@ -267,7 +267,7 @@ func (r *integrationZendeskResource) Update(ctx context.Context, req resource.Up if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update Zendesk integration, got error: %s", err), + fmt.Sprintf("Unable to update Zendesk integration. Got error: %s", err), ) return } @@ -291,7 +291,7 @@ func (r *integrationZendeskResource) Delete(ctx context.Context, req resource.De if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete Zendesk integration, got error: %s", err), + fmt.Sprintf("Unable to delete Zendesk integration. Got error: %s", err), ) return } diff --git a/internal/provider/organization_data_source.go b/internal/provider/organization_data_source.go index 33c66e2..7e81fbd 100644 --- a/internal/provider/organization_data_source.go +++ b/internal/provider/organization_data_source.go @@ -84,7 +84,7 @@ func (d *OrganizationDataSource) Configure(ctx context.Context, req datasource.C if !ok { resp.Diagnostics.AddError( "Unexpected Data Source Configure Type", - fmt.Sprintf("Expected *mondoov1.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *mondoov1.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -118,7 +118,7 @@ func (d *OrganizationDataSource) Read(ctx context.Context, req datasource.ReadRe payload, err := d.client.GetOrganization(ctx, orgMrn) if err != nil { - resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to fetch organization, got error: %s", err)) + resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to fetch organization. Got error: %s", err)) return } diff --git a/internal/provider/policies_data_source.go b/internal/provider/policies_data_source.go index 659310a..88adb0c 100644 --- a/internal/provider/policies_data_source.go +++ b/internal/provider/policies_data_source.go @@ -139,7 +139,7 @@ func (d *policiesDataSource) Configure(ctx context.Context, req datasource.Confi if !ok { resp.Diagnostics.AddError( "Unexpected Data Source Configure Type", - fmt.Sprintf("Expected *mondoov1.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *mondoov1.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return diff --git a/internal/provider/policy_assignment_resource.go b/internal/provider/policy_assignment_resource.go index 904bc88..6012e41 100644 --- a/internal/provider/policy_assignment_resource.go +++ b/internal/provider/policy_assignment_resource.go @@ -49,7 +49,7 @@ func (r *policyAssignmentResource) Schema(_ context.Context, req resource.Schema resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, }, "policies": schema.ListAttribute{ @@ -62,7 +62,7 @@ func (r *policyAssignmentResource) Schema(_ context.Context, req resource.Schema }, }, "state": schema.StringAttribute{ - MarkdownDescription: "Policy Assignment State (preview, enabled, disabled).", + MarkdownDescription: "Policy assignment state (preview, enabled, or disabled).", Default: stringdefault.StaticString("enabled"), Computed: true, Optional: true, @@ -85,7 +85,7 @@ func (r *policyAssignmentResource) Configure(ctx context.Context, req resource.C if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -199,7 +199,7 @@ func (r *policyAssignmentResource) Update(ctx context.Context, req resource.Upda } else { resp.Diagnostics.AddError( "Invalid state: "+state, - "Invalid state "+state+", use one of: enabled, preview, disabled", + "Invalid state "+state+". Valid states are enabled, preview, and disabled", ) return } diff --git a/internal/provider/querypack_assignment_resource.go b/internal/provider/querypack_assignment_resource.go index 1b3993d..6332f62 100644 --- a/internal/provider/querypack_assignment_resource.go +++ b/internal/provider/querypack_assignment_resource.go @@ -51,7 +51,7 @@ func (r *queryPackAssignmentResource) Schema(_ context.Context, req resource.Sch resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier. If it is not provided, the provider space is used.", + MarkdownDescription: "Mondoo space identifier. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -68,7 +68,7 @@ func (r *queryPackAssignmentResource) Schema(_ context.Context, req resource.Sch }, }, "state": schema.StringAttribute{ - MarkdownDescription: "QueryPack Assignment State (enabled, disabled).", + MarkdownDescription: "QueryPack Assignment State (enabled or disabled).", Default: stringdefault.StaticString("enabled"), Computed: true, Optional: true, @@ -91,7 +91,7 @@ func (r *queryPackAssignmentResource) Configure(ctx context.Context, req resourc if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -202,7 +202,7 @@ func (r *queryPackAssignmentResource) Update(ctx context.Context, req resource.U } else { resp.Diagnostics.AddError( "Invalid state: "+state, - "Invalid state "+state+", use one of: enabled, disabled", + "Invalid state "+state+". Valid states are enabled and disabled", ) return } diff --git a/internal/provider/registration_token.go b/internal/provider/registration_token.go index a976fe8..9bfecd6 100644 --- a/internal/provider/registration_token.go +++ b/internal/provider/registration_token.go @@ -57,7 +57,7 @@ func (r *RegistrationTokenResource) Schema(ctx context.Context, req resource.Sch Attributes: map[string]schema.Attribute{ "space_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Space Identifier to create the token in. If it is not provided, the provider space is used.", + MarkdownDescription: "Identifier of the Mondoo space in which to create the token. If there is no space ID, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -116,7 +116,7 @@ func (r *RegistrationTokenResource) Configure(ctx context.Context, req resource. if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -166,8 +166,8 @@ func (r *RegistrationTokenResource) Create(ctx context.Context, req resource.Cre if expires_in != nil && noExpiration != nil { resp.Diagnostics.AddError( - "Either expires_in or no_expiration needs to be set", - "Either expires_in or no_expiration needs to be set", + "Either expires_in or no_expiration must be set", + "Either expires_in or no_expiration must be set", ) return } @@ -197,7 +197,7 @@ func (r *RegistrationTokenResource) Create(ctx context.Context, req resource.Cre if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create registration token, got error: %s", err), + fmt.Sprintf("Unable to create registration token. Got error: %s", err), ) return } @@ -210,7 +210,7 @@ func (r *RegistrationTokenResource) Create(ctx context.Context, req resource.Cre data.ExpiresAt = types.StringValue(string(generateRegistrationToken.RegistrationToken.ExpiresAt)) // Write logs using the tflog package - tflog.Trace(ctx, "created a service account resource") + tflog.Trace(ctx, "created a token resource") // Save data into Terraform state resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) @@ -287,7 +287,7 @@ func (r *RegistrationTokenResource) Delete(ctx context.Context, req resource.Del if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to update service account, got error: %s", err), + fmt.Sprintf("Unable to update token. Got error: %s", err), ) return } diff --git a/internal/provider/scim_group_mapping.go b/internal/provider/scim_group_mapping.go index 2958e8d..c2f3134 100644 --- a/internal/provider/scim_group_mapping.go +++ b/internal/provider/scim_group_mapping.go @@ -88,7 +88,7 @@ func (r *scimGroupMappingResource) Configure(ctx context.Context, req resource.C if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return diff --git a/internal/provider/service_account_resource.go b/internal/provider/service_account_resource.go index 74e0535..236f7c8 100644 --- a/internal/provider/service_account_resource.go +++ b/internal/provider/service_account_resource.go @@ -94,20 +94,20 @@ func (r *ServiceAccountResource) Schema(ctx context.Context, req resource.Schema }, "mrn": schema.StringAttribute{ Computed: true, - MarkdownDescription: "The Mondoo Resource Name (MRN) of the created service account.", + MarkdownDescription: "The Mondoo resource name (MRN) of the created service account.", PlanModifiers: []planmodifier.String{ stringplanmodifier.UseStateForUnknown(), }, }, "space_id": schema.StringAttribute{ // TODO: add check that either space or org needs to be set - MarkdownDescription: "Mondoo Space Identifier to create the service account in.", + MarkdownDescription: "The identifier of the Mondoo space in which to create the service account.", Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.UseStateForUnknown(), }, }, "org_id": schema.StringAttribute{ - MarkdownDescription: "Mondoo Organization Identifier to create the service account in.", + MarkdownDescription: "Identifier of the Mondoo organization in which to create the service account.", Optional: true, }, "roles": schema.ListAttribute{ @@ -121,7 +121,7 @@ func (r *ServiceAccountResource) Schema(ctx context.Context, req resource.Schema }, "credential": schema.StringAttribute{ Computed: true, - MarkdownDescription: "The service account credential in JSON format, base64 encoded. This is the same content when creating service account credentials through the web console.", + MarkdownDescription: "The service account credential in JSON format, base64 encoded. This is the same content when creating service account credentials through the Mondoo Console.", PlanModifiers: []planmodifier.String{ stringplanmodifier.UseStateForUnknown(), }, @@ -142,7 +142,7 @@ func (r *ServiceAccountResource) Configure(ctx context.Context, req resource.Con if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *http.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *http.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -233,7 +233,7 @@ func (r *ServiceAccountResource) Create(ctx context.Context, req resource.Create if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create service account, got error: %s", err), + fmt.Sprintf("Unable to create service account. Got error: %s", err), ) return } @@ -256,7 +256,7 @@ func (r *ServiceAccountResource) Create(ctx context.Context, req resource.Create if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create service account, got error: %s", err), + fmt.Sprintf("Unable to create service account. Got error: %s", err), ) return } @@ -320,7 +320,7 @@ func (r *ServiceAccountResource) Read(ctx context.Context, req resource.ReadRequ if err != nil { resp.Diagnostics.AddError( "Client Error", - fmt.Sprintf("Unable to read service account, got error: %s", err), + fmt.Sprintf("Unable to read service account. Got error: %s", err), ) return } @@ -361,7 +361,7 @@ func (r *ServiceAccountResource) Update(ctx context.Context, req resource.Update }) err := r.client.Mutate(ctx, &updateMutation, updateInput, nil) if err != nil { - resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to update service account, got error: %s", err)) + resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to update service account. Got error: %s", err)) return } @@ -382,8 +382,8 @@ func (r *ServiceAccountResource) Delete(ctx context.Context, req resource.Delete scopeMrn := r.getScope(ctx, data) if scopeMrn == "" { resp.Diagnostics.AddError( - "Either space_id or org_id needs to be set", - "Either space_id or org_id needs to be set", + "Either space_id or org_id must be set", + "Either space_id or org_id must be set", ) return } @@ -403,7 +403,7 @@ func (r *ServiceAccountResource) Delete(ctx context.Context, req resource.Delete }) err := r.client.Mutate(ctx, &deleteMutation, deleteInput, nil) if err != nil { - resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to update service account, got error: %s", err)) + resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to update service account. Got error: %s", err)) return } } diff --git a/internal/provider/space_data_source.go b/internal/provider/space_data_source.go index e45302a..24e6468 100644 --- a/internal/provider/space_data_source.go +++ b/internal/provider/space_data_source.go @@ -69,7 +69,7 @@ func (d *SpaceDataSource) Configure(ctx context.Context, req datasource.Configur if !ok { resp.Diagnostics.AddError( "Unexpected Data Source Configure Type", - fmt.Sprintf("Expected *mondoov1.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *mondoov1.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return @@ -101,7 +101,7 @@ func (d *SpaceDataSource) Read(ctx context.Context, req datasource.ReadRequest, payload, err := d.client.GetSpace(ctx, space.MRN()) if err != nil { resp.Diagnostics.AddError("Client Error", - fmt.Sprintf("Unable to fetch space, got error: %s", err), + fmt.Sprintf("Unable to fetch space. Got error: %s", err), ) return } diff --git a/internal/provider/space_resource.go b/internal/provider/space_resource.go index ac09c5b..7f82c6e 100644 --- a/internal/provider/space_resource.go +++ b/internal/provider/space_resource.go @@ -61,7 +61,7 @@ func (r *SpaceResource) Schema(ctx context.Context, req resource.SchemaRequest, }, }, "id": schema.StringAttribute{ - MarkdownDescription: "Id of the space. Must be globally unique. If the provider has a space configured and this field is not provided, the provider space is used.", + MarkdownDescription: "ID of the space. Must be globally unique. If the provider has a space configured and this field is empty, the provider space is used.", Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ @@ -105,7 +105,7 @@ func (r *SpaceResource) Configure(ctx context.Context, req resource.ConfigureReq if !ok { resp.Diagnostics.AddError( "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *mondoov1.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData), + fmt.Sprintf("Expected *mondoov1.Client. Got: %T. Please report this issue to the provider developers.", req.ProviderData), ) return } @@ -140,7 +140,7 @@ func (r *SpaceResource) Create(ctx context.Context, req resource.CreateRequest, if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to create space, got error: %s", err), + fmt.Sprintf("Unable to create space. Got error: %s", err), ) return } @@ -215,7 +215,7 @@ func (r *SpaceResource) Update(ctx context.Context, req resource.UpdateRequest, err = r.client.UpdateSpace(ctx, planSpaceID, data.Name.ValueString()) if err != nil { resp.Diagnostics. - AddError("Client Error", fmt.Sprintf("Unable to update space, got error: %s", err)) + AddError("Client Error", fmt.Sprintf("Unable to update space. Got error: %s", err)) return } @@ -238,7 +238,7 @@ func (r *SpaceResource) Delete(ctx context.Context, req resource.DeleteRequest, if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to delete space, got error: %s", err), + fmt.Sprintf("Unable to delete space. Got error: %s", err), ) return } @@ -250,7 +250,7 @@ func (r *SpaceResource) ImportState(ctx context.Context, req resource.ImportStat if err != nil { resp.Diagnostics. AddError("Client Error", - fmt.Sprintf("Unable to retrieve space, got error: %s", err), + fmt.Sprintf("Unable to retrieve space. Got error: %s", err), ) return }