-
Notifications
You must be signed in to change notification settings - Fork 64
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
AzureStack Scale set Resource #15
Conversation
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.
Hello @thetonymaster,
In addition to the comments I have left inline:
-
Would we want to keep the unsupported properties & code for them in & commented out so when they are supported it is easy to implement them?
-
The documentation doesn't appear to have been updated with the new resource prefix: azurestack
-
one unsupported property is still active & in the docs
-
Some of the acceptance tests currently do not pass as required prerequisite resources are not implemented yet. Could we either skip() or remove them?
|
||
"resource_group_name": resourceGroupNameSchema(), | ||
|
||
// "zones": zonesSchema(), |
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.
A comment explaining why this was commented out would be useful?
} | ||
storageProfile.OsDisk = osDisk | ||
|
||
// if _, ok := d.GetOk("storage_profile_data_disk"); ok { |
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 there a reason this was commented out and not removed? an inline comment describe why would be useful
@@ -0,0 +1,314 @@ | |||
--- | |||
layout: "azurerm" | |||
page_title: "Azure Resource Manager: azurerm_virtual_machine_scale_set" |
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.
These have not been updated to say azure stack.
Also this file has not been updated to include the resource.
Create a Virtual Machine scale set. | ||
--- | ||
|
||
# azurerm\_virtual\_machine\_scale\_set |
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.
Shouldn't this be azurestack?
Also the \s can be removed.
container_access_type = "private" | ||
} | ||
|
||
resource "azurerm_virtual_machine_scale_set" "test" { |
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.
Shouldn't this also be azurestack
Set: resourceArmVirtualMachineScaleSetNetworkConfigurationHash, | ||
}, | ||
|
||
"boot_diagnostics": { |
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.
According to a test comment this is not supported, could we comment it out with the reasoning why?
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.
Hello, @katbyte I've opened an issue about this Azure/azure-sdk-for-go#2495. This field can be set according to https://docs.microsoft.com/en-us/rest/api/compute/virtualmachinescalesets/createorupdate#virtualmachinescalesetvmprofile documentation.
For now, we are going to comment on this argument and give this reason.
* `sku` - (Optional) Specifies the SKU of the image used to create the virtual machines. | ||
* `version` - (Optional) Specifies the version of the image used to create the virtual machines. | ||
|
||
`boot_diagnostics` supports the following: |
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.
Test comment says this is not supported, so it should probably be removed from here
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.
This comes in the response of the request, but I can't send any configuration, will ask Walter if this is supported by AzureStack, if it is, will fill a bug for a missing argument, in the meanwhile I moved it to the argument reference.
Hey @katbyte About this Hello @thetonymaster, In addition to the comments I have left inline:
I originally left them commented on the first release, but someone else removed them, so I started to remove them on the next PR's/
I knew I missed something, thanks for this
Had an outage yesterday on the env and for some reason I got pass (?), let me check those and skip the ones that will not pass |
Hello @katbyte, I skipped all the unsupported test and give comments on the reason why were skipped. Could you check again, please? |
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.
Hi @thetonymaster,
I have given this another review and left some comments inline. They are all very minor and are mostly about adding some validation to the schema.
Once these have been address I think we can get this merged.
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, | ||
}, |
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 get a ValidateFunc: validation.NoZeroValues,
here?
"capacity": { | ||
Type: schema.TypeInt, | ||
Required: true, | ||
}, |
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 get some validation here? ValidateFunc: validation.IntAtLeast(0),
should do it as i think 0 is a valid capacity.
"upgrade_policy_mode": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
}, |
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 get some validation here:
ValidateFunc: validation.StringInSlice([]string{
string(compute.Automatic),
string(compute.Manual),
string(compute.Rolling),
}, true),
"type": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
DiffSuppressFunc: ignoreCaseDiffSuppressFunc, |
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 use suppress.CaseDifference
here?
} | ||
|
||
err = future.WaitForCompletion(ctx, client.Client) | ||
if err != 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.
This could be:
if err := future.WaitForCompletion(ctx, client.Client); err != nil {
return err
}
} | ||
|
||
err = future.WaitForCompletion(ctx, client.Client) | ||
if err != 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.
This could also be
if err := future.WaitForCompletion(ctx, client.Client); err != nil {
return err
}
page_title: "Azure Resource Manager: azurestack_virtual_machine_scale_set" | ||
sidebar_current: "docs-azurestack-resource-compute-virtualmachine-scale-set" | ||
description: |- | ||
Create a Virtual Machine scale set. |
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.
This should be Manages a
|
||
# azurestack\_virtual\_machine\_scale\_set | ||
|
||
Create a virtual machine scale set. |
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.
This should be Manage a
Create a Virtual Machine scale set. | ||
--- | ||
|
||
# azurestack\_virtual\_machine\_scale\_set |
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.
this \s are not required and can be removed
Requested changes backported to AzureRM here |
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.
hi @thetonymaster,
Thank you for the updates, the appear to address all my comments. However you seem to have included some files and packages unrelated to VMSS? specifically event-hub and service bus. I don't see any reason for them to be in this PR.
Also you have switched from the vended azurerm to the azurestack validate & suppress packages, could we swap back and not re-add them?
azurestack/helpers/azure/datalake.go
Outdated
@@ -0,0 +1,23 @@ | |||
package azure |
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.
I'm not sure why this file was added?
azurestack/helpers/azure/eventhub.go
Outdated
@@ -0,0 +1,145 @@ | |||
package azure |
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.
I'm not sure why this file was added?
@@ -0,0 +1,166 @@ | |||
package azure |
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.
I'm not sure why this file was added?
@@ -0,0 +1,10 @@ | |||
package suppress |
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.
These have been vended in from AzureRM and should not be re-added
@@ -0,0 +1,51 @@ | |||
package suppress |
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.
These have been vended in from AzureRM and should not be re-added
azurestack/helpers/suppress/time.go
Outdated
@@ -0,0 +1,18 @@ | |||
package suppress |
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.
These have been vended in from AzureRM and should not be re-added
"github.com/terraform-providers/terraform-provider-azurestack/azurestack/helpers/azure" | ||
"github.com/terraform-providers/terraform-provider-azurestack/azurestack/helpers/suppress" |
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.
These should reference azurerm not azurestack
@@ -11,6 +11,8 @@ import ( | |||
"github.com/hashicorp/terraform/helper/schema" | |||
"github.com/hashicorp/terraform/helper/structure" | |||
"github.com/hashicorp/terraform/helper/validation" | |||
"github.com/terraform-providers/terraform-provider-azurestack/azurestack/helpers/azure" | |||
"github.com/terraform-providers/terraform-provider-azurestack/azurestack/helpers/suppress" |
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.
These should reference azurerm not azurestack
vendor/vendor.json
Outdated
@@ -38,6 +38,12 @@ | |||
"revision": "cd93ccfe0395e70031704ca68f14606588eec120", | |||
"revisionTime": "2018-06-08T21:25:51Z" | |||
}, | |||
{ | |||
"checksumSHA1": "FF+JJRL14lbAx8c2s4pixvIulCA=", | |||
"path": "github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub", |
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.
Why are we updating/adding the event hub package in this PR?
vendor/vendor.json
Outdated
@@ -50,6 +56,12 @@ | |||
"revision": "cd93ccfe0395e70031704ca68f14606588eec120", | |||
"revisionTime": "2018-06-08T21:25:51Z" | |||
}, | |||
{ | |||
"checksumSHA1": "/zjoJNfxpxVj22QUxBdBjQcsbHY=", | |||
"path": "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus", |
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.
Why are we updating/adding the Service package in this PR?
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.
I vendored the azure
package from AzureRM, since it uses (for now) only the generic functions and it keeps getting out of sync. both of the new dependencies come from that package.
565fe3b
to
0b5f6f6
Compare
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! |
No description provided.