New Resource: azurerm_qumulo_file_system#28704
Conversation
b43ce3c to
2833ac0
Compare
ms-zhenhua
left a comment
There was a problem hiding this comment.
Hi @teowa ,
Thanks for this PR - I've taken a look through and left some comments inline. If we can fix those up, this should be good to go 👍
| var ( | ||
| _ sdk.Resource = FileSystemResource{} | ||
| _ sdk.ResourceWithUpdate = FileSystemResource{} | ||
| ) |
There was a problem hiding this comment.
| var ( | |
| _ sdk.Resource = FileSystemResource{} | |
| _ sdk.ResourceWithUpdate = FileSystemResource{} | |
| ) | |
| var _ sdk.ResourceWithUpdate = FileSystemResource{} |
| admin_password = ")^X#ZX#JRyIY}t9" | ||
| availability_zone = "1" | ||
| delegated_subnet_id = azurerm_subnet.example.id | ||
| marketplace_plan_id = "qumulo-on-azure-v1%%gmz7xq9ge3py%%P1M" |
There was a problem hiding this comment.
why is marketplace_plan_id set such a strange value? Is there any documents guiding users to set this property?
There was a problem hiding this comment.
fixed, the plan_id value is not limited to azure-native-qumulo-v3. Contact Azure Qumulo support for other possible values.
| ValidateFunc: commonids.ValidateSubnetID, | ||
| }, | ||
|
|
||
| "user_email_address": { |
There was a problem hiding this comment.
| "user_email_address": { | |
| "email": { |
| Sensitive: true, | ||
| }, | ||
|
|
||
| "marketplace_plan_id": { |
There was a problem hiding this comment.
| "marketplace_plan_id": { | |
| "plan_id": { |
|
|
||
| resp, err := clients.Qumulo.FileSystemsClient.Get(ctx, *id) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("reading %s: %+v", *id, err) |
There was a problem hiding this comment.
| return nil, fmt.Errorf("reading %s: %+v", *id, err) | |
| return nil, fmt.Errorf("retrieving %s: %+v", *id, err) |
| return nil, fmt.Errorf("reading %s: %+v", *id, err) | ||
| } | ||
|
|
||
| return utils.Bool(resp.Model != nil), nil |
There was a problem hiding this comment.
| return utils.Bool(resp.Model != nil), nil | |
| return pointer.To(resp.Model != nil), nil |
| func FileSystemName(v interface{}, k string) (warnings []string, errors []error) { | ||
| value := v.(string) | ||
| if matched := regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9-]{0,13}[a-zA-Z0-9]$`).Match([]byte(value)); !matched { | ||
| errors = append(errors, fmt.Errorf("%q must be between 2 and 15 characters in length, must not begin or end with a hyphen and may only contain alphanumeric characters and hyphens", k)) |
There was a problem hiding this comment.
| errors = append(errors, fmt.Errorf("%q must be between 2 and 15 characters in length, must not begin or end with a hyphen and may only contain alphanumeric characters and hyphens", k)) | |
| errors = append(errors, fmt.Errorf("`%q` must be between 2 and 15 characters in length, must not begin or end with a hyphen and may only contain alphanumeric characters and hyphens", k)) |
| layout: "azurerm" | ||
| page_title: "Azure Resource Manager: azurerm_qumulo_file_system" | ||
| description: |- | ||
| Manages a Azure Native Qumulo Scalable File System. |
There was a problem hiding this comment.
| Manages a Azure Native Qumulo Scalable File System. | |
| Manages an Azure Native Qumulo Scalable File System. |
|
|
||
| # azurerm_qumulo_file_system | ||
|
|
||
| Manages a Azure Native Qumulo Scalable File System. |
There was a problem hiding this comment.
| Manages a Azure Native Qumulo Scalable File System. | |
| Manages an Azure Native Qumulo Scalable File System. |
…der-azurerm into qumulo_file_system
…m into qumulo_file_system
|
Hi @stephybun , thanks for reviewing this. Please kindly take another look. |
| "offer_id": { | ||
| Type: pluginsdk.TypeString, | ||
| Required: true, | ||
| ForceNew: true, | ||
| // the value can be "qumulo-saas-mpp" | ||
| ValidateFunc: validation.StringIsNotEmpty, | ||
| }, | ||
|
|
||
| "plan_id": { | ||
| Type: pluginsdk.TypeString, | ||
| Required: true, | ||
| ForceNew: true, | ||
| // the value includes but is not limitted to ["azure-native-qumulo-v3"] | ||
| ValidateFunc: validation.StringIsNotEmpty, | ||
| }, |
There was a problem hiding this comment.
we should use the hardcoded values you had before as defaults here?
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
According to the swagger publisher_id shouldn't be a required property but is marked as such in the schema here?
There was a problem hiding this comment.
added default to the publisher_id
There was a problem hiding this comment.
default also added to offer_id and plan_id.
|
Hi @katbyte , thanks for reviewing this! I have added inline reply, please kindly take another look. |
| Type: pluginsdk.TypeString, | ||
| Required: true, | ||
| ForceNew: true, | ||
| // the value includes but is not limitted to ["azure-native-qumulo-v3"] |
There was a problem hiding this comment.
| // the value includes but is not limitted to ["azure-native-qumulo-v3"] | |
| // the value includes but is not limited to ["azure-native-qumulo-v3"] |
…m into qumulo_file_system
|
Hi @stephybun @katbyte , thanks for reviewing! I have updated the code as in the review comment, could you please take another look? Thanks! |
| Type: pluginsdk.TypeString, | ||
| Required: true, | ||
| ForceNew: true, | ||
| ValidateFunc: validation.StringIsNotEmpty, |
There was a problem hiding this comment.
could we validate the email address, should be able to use the net/mail package mail.ParseAddress(email)
|
Hi @katbyte , I am unable to test this online because the test subscription does not allow for Azure Marketplace payment. |
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |



Community Note
Description
supersede #22911 , which had been reviewed but was blocked by upstream API
New Resource:
azurerm_qumulo_file_systemPR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
NOTE: service team asks to run the acctest in canary region, for example, "eastasia", "centralus2euap"
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_qumulo_file_system[GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #0000
Note
If this PR changes meaningfully during the course of review please update the title and description as required.