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

Error in azuread_application_password Resource: Missing application_id and Unsupported application_object_id #88

Open
dambor opened this issue Oct 1, 2024 · 0 comments

Comments

@dambor
Copy link

dambor commented Oct 1, 2024

Description:
When running terraform plan on the castai-aks-cluster module, I encountered the following errors related to the azuread_application_password resource:


╷
│ Error: Missing required argument
│
│   on .terraform/modules/castai-aks-cluster/iam.tf line 93, in resource "azuread_application_password" "castai":
│   93: resource "azuread_application_password" "castai" {
│
│ The argument "application_id" is required, but no definition was found.
╵
╷
│ Error: Unsupported argument
│
│   on .terraform/modules/castai-aks-cluster/iam.tf line 94, in resource "azuread_application_password" "castai":
│   94:   application_object_id = azuread_application.castai.object_id
│
│ An argument named "application_object_id" is not expected here.
╵
Error: 'terraform plan' command failed. Exiting now.
make: *** [demo-interactive] Error 1

Expected Behavior:

The azuread_application_password resource should reference application_id rather than application_object_id. According to Terraform documentation, application_id is the required argument.

Steps to Reproduce:

1.	Run terraform plan on a configuration that uses the castai-aks-cluster module.
2.	Observe the errors related to the missing application_id argument and the unsupported application_object_id argument.

Proposed Solution:

In the file .terraform/modules/castai-aks-cluster/iam.tf, replace the application_object_id with application_id.

The corrected resource block should look like this:

resource "azuread_application_password" "castai" {
  application_id = azuread_application.castai.application_id  # Correct argument
  value          = random_password.password.result
  end_date       = "2099-01-01T00:00:00Z"
}

https://github.com/castai/terraform-castai-aks/blob/main/iam.tf

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

No branches or pull requests

1 participant