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

azuredevops_serviceendpoint_kubernetes crash if the parameters are empty #1084

Open
diegolagospagopa opened this issue Jun 26, 2024 · 1 comment
Labels

Comments

@diegolagospagopa
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and Azure DevOps Provider) Version

  • terraform: 1.7.3
  • azure devops: 1.1.1

Affected Resource(s)

  • azuredevops_serviceendpoint_kubernetes

Terraform Configuration Files

resource "azuredevops_serviceendpoint_kubernetes" "aks_prod" {
  depends_on            = [data.azuredevops_project.project]
  project_id            = data.azuredevops_project.project.id
  service_endpoint_name = local.srv_endpoint_name_aks_prod
  apiserver_url         = module.printit_prod_secrets.values["pagopa-p-itn-prod-aks-apiserver-url"].value
  authorization_type    = "ServiceAccount"
  service_account {
    # base64 values
    token   = module.printit_prod_secrets.values["pagopa-p-itn-prod-aks-azure-devops-sa-token"].value
    ca_cert = module.printit_prod_secrets.values["pagopa-p-itn-prod-aks-azure-devops-sa-cacrt"].value
  }
}

Debug Output

Panic Output

crash.log

Expected Behavior

Show an error message related to the fact that the service account fields are empty

Actual Behavior

crash badly

Steps to Reproduce

  1. create a service connection aks, with service account token and crt but the fields must be empty
  2. terraform apply

Important Factoids

References

  • #0000
@xuzhang3
Copy link
Collaborator

xuzhang3 commented Jul 1, 2024

@diegolagospagopa can you check the module values module.printit_prod_secrets.values , if this value empty then ADO would take the empty string as the input which is invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants