Skip to content

Fix: Remove the need for client_id and client_secret (issue #59)#60

Open
nalberti wants to merge 2 commits into
CheckPointSW:masterfrom
nalberti:master
Open

Fix: Remove the need for client_id and client_secret (issue #59)#60
nalberti wants to merge 2 commits into
CheckPointSW:masterfrom
nalberti:master

Conversation

@nalberti
Copy link
Copy Markdown

@nalberti nalberti commented Apr 8, 2026

Add default values for client_id and client_secret in the high-availability module and remove them from the provider blocks.

nalberti added 2 commits April 8, 2026 16:19
set default of null for client_id and client_secret
Removed client_id and client_secret from provider configurations  defaulting to ChainedTokenCredential.
Copilot AI review requested due to automatic review settings April 8, 2026 08:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make the high-availability Terraform module no longer require client_id and client_secret by making those variables optional and removing them from the module-local Azure provider configurations.

Changes:

  • Removed client_id and client_secret from azapi and azurerm provider blocks in the high-availability module.
  • Made client_id and client_secret variables optional by setting default = null.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
modules/high-availability/versions.tf Removes explicit Service Principal credentials from provider configuration.
modules/high-availability/variables.tf Makes client_id/client_secret optional via default = null.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

subscription_id = var.subscription_id
client_id = var.client_id
client_secret = var.client_secret
tenant_id = var.tenant_id
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

By removing client_id/client_secret from the azapi provider config, the module no longer supports authenticating via these module inputs (even if callers still pass them). This is a breaking behavior change vs the previous module interface and can cause unexpected auth failures for Service Principal-based deployments.

Consider either (a) wiring the (now-optional) variables into the provider config so they work when set, or (b) removing/deprecating the variables and updating module docs to clearly state credentials must come from the ambient auth chain (Azure CLI/MSI/env vars).

Suggested change
tenant_id = var.tenant_id
tenant_id = var.tenant_id
client_id = var.client_id
client_secret = var.client_secret

Copilot uses AI. Check for mistakes.
Comment on lines 12 to 23
variable "client_id" {
description = "Application ID(Client ID)"
type = string
default = null
}

variable "client_secret" {
description = "A secret string that the application uses to prove its identity when requesting a token. Also can be referred to as application password."
type = string
sensitive = true
default = null
}
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

client_id and client_secret are now optional (default null), but they are no longer referenced anywhere in the high-availability module after the provider changes. Keeping unused inputs is misleading (and currently conflicts with the module README, which describes these as required) and makes it unclear how Service Principal auth is intended to work.

Either remove/deprecate these variables, or reintroduce their usage so setting them has an effect.

Copilot uses AI. Check for mistakes.
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.

2 participants