-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Conversation
mbfrahry
commented
Mar 24, 2020
There was a problem hiding this 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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we do
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 { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be
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. |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. | ||
|
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mbfrahry! LGTM 👍
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 ... |
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! |