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

New Resource - azurerm_custom_resource_provider #6234

Merged
merged 6 commits into from
Mar 25, 2020

Conversation

mbfrahry
Copy link
Member

--- PASS: TestAccAzureRMCustomResourceProvider_basic (97.11s)
--- PASS: TestAccAzureRMCustomResourceProvider_action (150.96s)
--- PASS: TestAccAzureRMCustomResourceProvider_update (287.06s)

@mbfrahry mbfrahry requested a review from a team March 24, 2020 05:32
Copy link
Collaborator

@katbyte katbyte 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 the PR @mbfrahry, left some comments inline

Validations: expandCustomResourceProviderValidation(d.Get("validation").([]interface{})),
},
Location: &location,
Tags: tags.Expand(t),
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we do

Suggested change
Tags: tags.Expand(t),
Tags: tags.Expand(d.Get("tags").(map[string]interface{})),

return fmt.Errorf("retrieving Custom Resource Provider %q (Resource Group %q): %+v", name, resourceGroup, err)
}

if resp.ID == nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we check if id is "" empty here too?

return validations
}

func validateCustomResourceProviderName(v interface{}, k string) (warnings []string, errors []error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we put this into a /customproviders/validate package?

features {}
}
resource "azurerm_resource_group" "test" {
name = "acctestRG-cr-%d"
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be

Suggested change
name = "acctestRG-cr-%d"
name = "acctestRG-cp-%d"

for custom providers?


* `name` - (Required) Specifies the name of the route definition.

* `endpoint` - (Required) Specifies the endpoint of the route definition.
Copy link
Collaborator

Choose a reason for hiding this comment

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

are endpoints always urls? should we validate its a url?

"resource_group_name": azure.SchemaResourceGroupName(),

"resource_type": {
Type: schema.TypeList,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should these properties all be sets or does order matter/duplicates allowed?


A `validation` block supports the following:

* `specification` - (Required) The endpoint where the validation specification is located.
Copy link
Collaborator

Choose a reason for hiding this comment

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

the type property is missing from here?


* `name` - (Required) Specifies the name of the action.

* `endpoint` - (Required) Specifies the endpoint of the action.
Copy link
Collaborator

Choose a reason for hiding this comment

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

the type property is missing from here?

* `name` - (Required) Specifies the name of the route definition.

* `endpoint` - (Required) Specifies the endpoint of the route definition.

Copy link
Collaborator

Choose a reason for hiding this comment

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

the type property is missing from here?

"specification": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.NoZeroValues,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this always a url?

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @mbfrahry! LGTM 👍

@mbfrahry mbfrahry merged commit 01358e7 into master Mar 25, 2020
@mbfrahry mbfrahry deleted the f-custom-resource-provider branch March 25, 2020 05:29
mbfrahry added a commit that referenced this pull request Mar 25, 2020
@ghost
Copy link

ghost commented Mar 27, 2020

This has been released in version 2.3.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.3.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 24, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants