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

images: replacing the dependency on acceptance.AzureProvider #10519

Merged
merged 16 commits into from
Feb 10, 2021

Conversation

tombuildsstuff
Copy link
Contributor

Unfortunately, this PR's complicated due to how tangled this was - in short this removes the dependency on acceptance.AzureProvider by switching these to use Check functions. As a side effect this also fixes #10374 and fixes #10516 by switching to use ListComplete and iterating on the list, rather than only iterating over the first page of the Shared Image Versions.

When this is merged, we can merge #10511 and then proceed with enabling Binary Testing.

This is tested within the `azurerm_image` resource, so no need to test this twice
This is to try and work around an eventual consistency issue I can see exists
(via failing tests), but I'm struggling to repro:

> compute.GalleryImagesClient#Delete: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="CannotDeleteResource" Message="Can not delete resource before nested resources are deleted."
tombuildsstuff added a commit that referenced this pull request Feb 10, 2021
This commit enables the feature toggle for Binary Testing - which switches to using the
real Terraform Binary when running Acceptance Tests and allows for different versions of
Core to be used.

Due to the use of Service Packages, we require that Reattach testing is used - as such
this requires using Terraform Core 0.12.26 or later.

This commit depends on - and must be rebased on top of - #10521 and #10519 due to the
removal of `acceptance.AzureProvider` when Binary Testing is being used.

A future commit will remove support for the legacy testing framework after a suitable
transition period, but for the moment disabling this functionality is sufficient.
Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Thanks @tombuildsstuff - LGTM 👍

@tombuildsstuff tombuildsstuff merged commit a632c5d into master Feb 10, 2021
@tombuildsstuff tombuildsstuff deleted the r/acceptance-images branch February 10, 2021 17:27
@tombuildsstuff
Copy link
Contributor Author

Tests for this look good 👍

tombuildsstuff added a commit that referenced this pull request Feb 10, 2021
tombuildsstuff added a commit that referenced this pull request Feb 10, 2021
This commit enables the feature toggle for Binary Testing - which switches to using the
real Terraform Binary when running Acceptance Tests and allows for different versions of
Core to be used.

Due to the use of Service Packages, we require that Reattach testing is used - as such
this requires using Terraform Core 0.12.26 or later.

This commit depends on - and must be rebased on top of - #10521 and #10519 due to the
removal of `acceptance.AzureProvider` when Binary Testing is being used.

A future commit will remove support for the legacy testing framework after a suitable
transition period, but for the moment disabling this functionality is sufficient.
tombuildsstuff added a commit that referenced this pull request Feb 11, 2021
This commit enables the feature toggle for Binary Testing - which switches to using the
real Terraform Binary when running Acceptance Tests and allows for different versions of
Core to be used.

Due to the use of Service Packages, we require that Reattach testing is used - as such
this requires using Terraform Core 0.12.26 or later.

This commit depends on - and must be rebased on top of - #10521 and #10519 due to the
removal of `acceptance.AzureProvider` when Binary Testing is being used.

A future commit will remove support for the legacy testing framework after a suitable
transition period, but for the moment disabling this functionality is sufficient.
@ghost
Copy link

ghost commented Feb 11, 2021

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

tombuildsstuff added a commit that referenced this pull request Feb 23, 2021
This commit enables the feature toggle for Binary Testing - which switches to using the
real Terraform Binary when running Acceptance Tests and allows for different versions of
Core to be used.

Due to the use of Service Packages, we require that Reattach testing is used - as such
this requires using Terraform Core 0.12.26 or later.

This commit depends on - and must be rebased on top of - #10521 and #10519 due to the
removal of `acceptance.AzureProvider` when Binary Testing is being used.

A future commit will remove support for the legacy testing framework after a suitable
transition period, but for the moment disabling this functionality is sufficient.
@ghost
Copy link

ghost commented Mar 13, 2021

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 as resolved and limited conversation to collaborators Mar 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants