Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nonspecific error: ResourceCreationValidateFailed #3262

Open
MitchellGerdisch opened this issue May 6, 2024 · 1 comment
Open

Nonspecific error: ResourceCreationValidateFailed #3262

MitchellGerdisch opened this issue May 6, 2024 · 1 comment
Labels
kind/enhancement Improvements or new features upstream/service

Comments

@MitchellGerdisch
Copy link

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Using the following code which has a rather subtle error for the Domain resource:

    const baseName = "pulumi"
    const resourceGroup = new azure_native.resources.ResourceGroup(`${baseName}-rg`)
    // Create an Azure Communication Services Email Service
    const emailService = new azure_native.communication.EmailService(`${baseName}-ems`, {
        resourceGroupName: resourceGroup.name,
        location: "Global",
        dataLocation: "United States",
    });

    // Create an Email Domain associated with the Email Service
    const emailDomain = new azure_native.communication.Domain(`${baseName}-dom`, {
        domainManagement: "AzureManagedDomain", // This is THE INCORRECT STRING VALUE
        emailServiceName: emailService.name, 
        location: "global",
        resourceGroupName: resourceGroup.name,
    });

One gets the following error:
error: Code="ResourceCreationValidateFailed" Message="The resource validation failed."

The cause of the error is that the domainManagement field should be set to the string AzureManaged or use the enumeration that is available.
It took a bit of effort to figure this out and it would be a much better experience if the error included a reference to what is causing the validation to fail.

Affected area/feature

@MitchellGerdisch MitchellGerdisch added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels May 6, 2024
@MitchellGerdisch MitchellGerdisch changed the title Nonspecific error: ResourceCreationValidateFailed and missing docs information Nonspecific error: ResourceCreationValidateFailed May 6, 2024
@danielrbradley
Copy link
Member

Unfortunately, this validation and these errors are provided by the Azure API – we just pass on any error message as error output. This most likely needs addressing by Azure, then will be automatically surfaced by this provider.

@danielrbradley danielrbradley added upstream/service and removed needs-triage Needs attention from the triage team labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features upstream/service
Projects
None yet
Development

No branches or pull requests

2 participants