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

AzureStack Scale set Resource #15

Merged
merged 27 commits into from
Sep 13, 2018
Merged

Conversation

thetonymaster
Copy link
Contributor

No description provided.

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.

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(),
Copy link
Collaborator

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 {
Copy link
Collaborator

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"
Copy link
Collaborator

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
Copy link
Collaborator

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" {
Copy link
Collaborator

@katbyte katbyte Jul 31, 2018

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": {
Copy link
Collaborator

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?

Copy link
Contributor

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:
Copy link
Collaborator

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

Copy link
Contributor Author

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.

@katbyte
Copy link
Collaborator

katbyte commented Jul 31, 2018

current test status:
screen shot 2018-07-31 at 09 43 23

@thetonymaster
Copy link
Contributor Author

thetonymaster commented Jul 31, 2018

Hey @katbyte

About this

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?

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/

The documentation doesn't appear to have been updated with the new resource prefix: azurestack
one unsupported property is still active & in the docs

I knew I missed something, thanks for this

Some of the acceptance tests currently do not pass as required prerequisite resources are not implemented yet. Could we either skip() or remove them?

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

@marinsalinas
Copy link
Contributor

Hello @katbyte,

I skipped all the unsupported test and give comments on the reason why were skipped.

Could you check again, please?

@ghost ghost added the size/XXL label Aug 29, 2018
@katbyte katbyte added this to the 0.4.0 milestone Sep 6, 2018
@ghost ghost added the size/XXL label Sep 6, 2018
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.

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,
},
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 get a ValidateFunc: validation.NoZeroValues, here?

"capacity": {
Type: schema.TypeInt,
Required: true,
},
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 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,
},
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 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,
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 use suppress.CaseDifference here?

}

err = future.WaitForCompletion(ctx, client.Client)
if err != nil {
Copy link
Collaborator

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 {
Copy link
Collaborator

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

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

@katbyte
Copy link
Collaborator

katbyte commented Sep 6, 2018

Requested changes backported to AzureRM here

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.

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?

@@ -0,0 +1,23 @@
package azure
Copy link
Collaborator

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,145 @@
package azure
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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,18 @@
package suppress
Copy link
Collaborator

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"
Copy link
Collaborator

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"
Copy link
Collaborator

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

@@ -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",
Copy link
Collaborator

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?

@@ -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",
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@katbyte
Copy link
Collaborator

katbyte commented Sep 13, 2018

tests now pass:
screen shot 2018-09-13 at 15 11 21

@katbyte katbyte merged commit d3a0077 into hashicorp:master Sep 13, 2018
katbyte added a commit that referenced this pull request Sep 13, 2018
@ghost
Copy link

ghost commented Jun 27, 2019

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 Jun 27, 2019
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.

3 participants