Skip to content

Conversation

@igrapel
Copy link

@igrapel igrapel commented Jan 19, 2026

Description

This PR improves the BCP081 diagnostic message to make it clearer:

  • Clarifies that missing resource type definitions affect IntelliSense and property validation
  • States that deployment is still handled by Azure Resource Manager
  • Adds a link to the official documentation

All unit tests that reference BCP081 have been updated to match the new message.

Fixes #13287

Checklist

Microsoft Reviewers: Open in CodeFlow

$"Resource type \"{resourceTypeReference.FormatName()}\" does not have types available. Bicep is unable to validate resource properties prior to deployment, but this will not block the resource from being deployed.");
$"Resource type \"{resourceTypeReference.FormatName()}\" does not have type definitions available. " +
"Bicep cannot validate properties or provide IntelliSense for this resource; deployment will still be attempted by Azure Resource Manager. " +
"See https://learn.microsoft.com/azure/azure-resource-manager/bicep/diagnostics/bcp081 for details.");
Copy link
Member

@anthony-c-martin anthony-c-martin Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line isn't necessary - the CoreWarning method already fills out the Uri field, which contains a link to the docs, and should be surfaced by IDEs or CLI:

{ Uri = new($"https://aka.ms/bicep/core-diagnostics#{code}") };

"BCP081",
$"Resource type \"{resourceTypeReference.FormatName()}\" does not have types available. Bicep is unable to validate resource properties prior to deployment, but this will not block the resource from being deployed.");
$"Resource type \"{resourceTypeReference.FormatName()}\" does not have type definitions available. " +
"Bicep cannot validate properties or provide IntelliSense for this resource; deployment will still be attempted by Azure Resource Manager. " +
Copy link
Member

@anthony-c-martin anthony-c-martin Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid referring to "Intellisense" or "Azure Resource Manager" because Bicep is used in non-Microsoft IDEs, and supports deploying of non-Azure resources through local deploy.

Suggested change
"Bicep cannot validate properties or provide IntelliSense for this resource; deployment will still be attempted by Azure Resource Manager. " +
"Property type validations and code completions are not available for this resource type, but the resource update operation will still be attempted if this file is deployed. " +

public Diagnostic ResourceTypesUnavailable(ResourceTypeReference resourceTypeReference) => CoreWarning(
"BCP081",
$"Resource type \"{resourceTypeReference.FormatName()}\" does not have types available. Bicep is unable to validate resource properties prior to deployment, but this will not block the resource from being deployed.");
$"Resource type \"{resourceTypeReference.FormatName()}\" does not have type definitions available. " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about something like:

Suggested change
$"Resource type \"{resourceTypeReference.FormatName()}\" does not have type definitions available. " +
$"Bicep does not have type definitions available for resource type \"{resourceTypeReference.FormatName()}\". " +

Copy link
Member

@anthony-c-martin anthony-c-martin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! See comments

@igrapel
Copy link
Author

igrapel commented Jan 23, 2026

Thanks for contributing! See comments

Thanks for the review @anthony-c-martin! I've updated the message based on your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning about missing resource types should be more explicit about impact (and where is the link to the help page?)

2 participants