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

Make update of allow_extensions_operations independent from provision_vm_agent. #8001

Merged

Conversation

NilsBusche
Copy link
Contributor

@NilsBusche NilsBusche commented Aug 4, 2020

This fixes the bug reported in #7985.

There is no API restriction which does not allow enabling
allow_extensions_operations if provision_vm_agent is false.
For example you can install the agent manually and after that enable
allow_extensions_operations.

Fixes #7985

@ghost ghost added the size/XS label Aug 4, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Hey @NilsBusche, this is just about there but we should keep the check in the create method since we can't create a virtual machine when allow_extensions_operations is true but provision_vm_agent is false.

Original Error: Code="InvalidParameter" Message="The value of parameter allowExtensionOperations is invalid."

Removing it from update makes sense to me!

…_vm_agent.

There is no API restriction which does not allow enabling
allow_extensions_operations if provision_vm_agent is false.

For example you can install the agent manually and after that enable
allow_extensions_operations.
@NilsBusche NilsBusche force-pushed the bugfix/allow-extension-operation branch from b481924 to 02b64ea Compare August 20, 2020 06:56
@NilsBusche NilsBusche changed the title Make allow_extensions_operations independent from provision_vm_agent. Make update of allow_extensions_operations independent from provision_vm_agent. Aug 20, 2020
@NilsBusche
Copy link
Contributor Author

Hey @NilsBusche, this is just about there but we should keep the check in the create method since we can't create a virtual machine when allow_extensions_operations is true but provision_vm_agent is false.

Original Error: Code="InvalidParameter" Message="The value of parameter allowExtensionOperations is invalid."

Removing it from update makes sense to me!

Hi @mbfrahry, you are correct. I changed this.

Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @NilsBusche

Thanks for pushing those changes - taking a look through this mostly LGTM - however can we add a test case to confirm that updating this field works (for both the Linux & Windows VM resources)?

Thanks!

@NilsBusche
Copy link
Contributor Author

hey @NilsBusche

Thanks for pushing those changes - taking a look through this mostly LGTM - however can we add a test case to confirm that updating this field works (for both the Linux & Windows VM resources)?

Thanks!

Hi @tombuildsstuff, I think there is already a test for checking if update works:
https://github.com/terraform-providers/terraform-provider-azurerm/blob/8442c30c2d443dcf90cfadbd8b52c4fba16d3189/azurerm/internal/services/compute/tests/linux_virtual_machine_resource_other_test.go#L52

Should we add/change a test to make sure that updating allow_extension_operations also works if provision_vm_agent was set to false at creation of the virtual machine? Or do you think the existing tests are sufficient?

@ghost ghost removed the waiting-response label Aug 21, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Should we add/change a test to make sure that updating allow_extension_operations also works if provision_vm_agent was set to false at creation of the virtual machine? Or do you think the existing tests are sufficient?

Let's add those tests for sure just to make sure that it's doing what we expect it to do

@ghost ghost added size/L and removed size/XS labels Aug 28, 2020
@NilsBusche NilsBusche force-pushed the bugfix/allow-extension-operation branch from 622e539 to f7abb29 Compare August 28, 2020 07:42
@NilsBusche
Copy link
Contributor Author

Let's add those tests for sure just to make sure that it's doing what we expect it to do

Hi @mbfrahry, added tests for updating allow_extension_operations if provision_vm_agent is false.

@tombuildsstuff tombuildsstuff added this to the v2.26.0 milestone Aug 28, 2020
Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for pushing those changes @NilsBusche

@tombuildsstuff tombuildsstuff dismissed mbfrahry’s stale review August 28, 2020 14:43

dismissing since changes have been pushed

@tombuildsstuff tombuildsstuff merged commit ee3f647 into hashicorp:master Aug 28, 2020
tombuildsstuff added a commit that referenced this pull request Aug 28, 2020
@ghost
Copy link

ghost commented Sep 4, 2020

This has been released in version 2.26.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.26.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Sep 27, 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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Sep 27, 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.

Fixup pull request #7749 (azurerm_*_virtual_machine - allow_extensions_operations can now be updated)
3 participants