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 prefix variable optional #359

Closed
wants to merge 4 commits into from
Closed

make prefix variable optional #359

wants to merge 4 commits into from

Conversation

withersj888
Copy link

Describe your changes

When providing a name for the Log Analytics Workspace (var.cluster_log_analytics_workspace_name) and a DNS prefix is not required for the cluster (dns_prefix argument within azurerm_kubernetes_cluster.main), the prefix variable is not required and should therefore be made optional.

Issue number

#308

Checklist before requesting a review

  • The pr title can be used to describe what this pr did in CHANGELOG.md file
  • I have executed pre-commit on my machine
  • I have passed pr-check on my machine

Thanks for your cooperation!

@withersj888
Copy link
Author

withersj888 commented Apr 26, 2023 via email

@lonegunmanb lonegunmanb added this to the 7.1.0 milestone Apr 27, 2023
@lonegunmanb
Copy link
Member

Hi @withersj888 thanks for opening this pr, since it looks like a non-breaking change I'd like to defer it to 7.1.0 so we can verify that this pr won't introduce any breaking or surprise change to this module. Our next release is 7.0.0 and I'd like to put all breaking changes in this release, we'll skip the test for breaking changes, that's why we'd like to defer this pr.

Again, thanks for your contribution, I'll deal with your proposal right after we've released the 7.0.

@withersj888
Copy link
Author

Hi @lonegunmanb, no worries, glad i could contribute.
I see the prepr-check has failed, but i'm not sure how to fix it - I ran make precommit before the PR.

@lonegunmanb
Copy link
Member

@withersj888 This pr made var.prefix an optional variable, and our pipeline is enforcing a sorting rule, so we need move this var.prefix to the right place.

I'm working on an autofix tool that could sort tf code after a pr has been merged so we won't be bothered to take care of such things any more, but for now we need sort code manually.

@zioproto
Copy link
Collaborator

@withersj888 look at this section of the README:
https://github.com/Azure/terraform-azurerm-aks#pre-commit--pr-check--test

you need to start with the pre-commit:

$ docker run --rm -v $(pwd):/src -w /src mcr.microsoft.com/azterraform:latest make pre-commit

Copy link
Member

@lonegunmanb lonegunmanb left a comment

Choose a reason for hiding this comment

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

Hi @withersj888 thanks for the update, we might need to move var.resource_group_name back to pass the pr-check.

variables.tf Outdated
@@ -1013,6 +1009,11 @@ variable "rbac_aad_tenant_id" {
default = null
}

variable "resource_group_name" {
Copy link
Member

Choose a reason for hiding this comment

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

resource_group_name is still a required variable so we should move it back to the original place.

@withersj888
Copy link
Author

withersj888 commented Apr 28, 2023 via email

@lonegunmanb
Copy link
Member

I'm closing this pr in favor of #382 , thanks for your contribution @withersj888 !

@lonegunmanb lonegunmanb closed this Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants