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

azurerm_kubernetes_cluster support for open_service_mesh #13462

Merged
merged 3 commits into from
Oct 21, 2021

Conversation

JasonWhall
Copy link
Contributor

Reworked from existing PR #11189 to address remaining comments.

Fixes #13434

Signed-off-by: JasonWhall <[email protected]>
@JasonWhall JasonWhall force-pushed the feature/add-osm-addon branch from 4ccd86b to 81ce5a8 Compare September 23, 2021 07:05
Copy link
Contributor

@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 this @JasonWhall

@tombuildsstuff tombuildsstuff added this to the v2.79.0 milestone Sep 28, 2021
@katbyte
Copy link
Collaborator

katbyte commented Sep 30, 2021

looks like we may have an eventually consistent error in the tests:

------- Stdout: -------
=== RUN   TestAccDataSourceKubernetesCluster_addOnProfileOpenServiceMesh
=== PAUSE TestAccDataSourceKubernetesCluster_addOnProfileOpenServiceMesh
=== CONT  TestAccDataSourceKubernetesCluster_addOnProfileOpenServiceMesh
    testcase.go:88: Step 1/1 error: Check failed: Check 2/2 error: azurerm_kubernetes_cluster.test: Attribute 'addon_profile.0.open_service_mesh.0.enabled' expected "true", got "false"
--- FAIL: TestAccDataSourceKubernetesCluster_addOnProfileOpenServiceMesh (529.14s)
FAIL

@katbyte katbyte modified the milestones: v2.79.0, v2.80.0 Oct 1, 2021
@JasonWhall
Copy link
Contributor Author

@katbyte This should now be correct. I originally enabled OSM as part of the tests, however it seems the pattern for other addons is to explicitly disable the addon as part of the test. I missed one check for this! 😄

@tombuildsstuff
Copy link
Contributor

@JasonWhall thanks for pushing that fix - however rather than setting this value to false, can we test this can be turned on and off - first by setting enabled to true and then false to validate this works end to end? This can be done using multiple test steps:

{
Config: r.addonProfileOpenServiceMeshConfig(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("addon_profile.0.open_service_mesh.#").HasValue("1"),
check.That(data.ResourceName).Key("addon_profile.0.open_service_mesh.0.enabled").HasValue("false"),
),
},

@JasonWhall
Copy link
Contributor Author

@tombuildsstuff I've updated the acc tests to include the enable and disable steps as suggested 🍻

tests result:

=== RUN   TestAccKubernetesCluster_addonProfileOpenServiceMesh
=== PAUSE TestAccKubernetesCluster_addonProfileOpenServiceMesh
=== CONT  TestAccKubernetesCluster_addonProfileOpenServiceMesh
--- PASS: TestAccKubernetesCluster_addonProfileOpenServiceMesh (678.86s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/containers    680.743s

Copy link
Contributor

@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 @JasonWhall

@katbyte katbyte modified the milestones: v2.80.0, v2.81.0, v2.82.0 Oct 8, 2021
@katbyte katbyte changed the title Add OSM Addon Option for kubernetes_cluster resource azurerm_kubernetes_cluster support for open_service_mesh Oct 21, 2021
@katbyte katbyte merged commit 0003503 into hashicorp:main Oct 21, 2021
katbyte added a commit that referenced this pull request Oct 21, 2021
@github-actions
Copy link

This functionality has been released in v2.82.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@JasonWhall JasonWhall deleted the feature/add-osm-addon branch October 23, 2021 08:15
@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2021
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.

Support for OSM addon profile in kubernetes_cluster resource
3 participants