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

Data Source: azuredevops_client_config, doesn't output id of the organisation which is what I was hoping it would give #1288

Open
garddolau opened this issue Jan 29, 2025 · 1 comment

Comments

@garddolau
Copy link

garddolau commented Jan 29, 2025

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 v1.9.8
Azure DevOps v1.6.0

Affected Resource(s)

data.azuredevops_client_config

Terraform Configuration Files

data "azuredevops_client_config" "current" {}

Debug Output

Panic Output

Expected Behavior

I would expect the output id to be the id of the organisation

Expected in state file

    {
      "mode": "data",
      "type": "azuredevops_client_config",
      "name": "current",
      "provider": "provider[\"registry.terraform.io/microsoft/azuredevops\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "id": "6b4e322a-b4b1-450c-90f8-0cc11f2124c7",
            "organization_url": "https://dev.azure.com/orgname/",
            "timeouts": null
          },
          "sensitive_attributes": []
        }
      ]
    }

Actual Behavior

The id output is actually the timestamp of when the request was run which is of no use

Actual from state file

    {
      "mode": "data",
      "type": "azuredevops_client_config",
      "name": "current",
      "provider": "provider[\"registry.terraform.io/microsoft/azuredevops\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "id": "2025-01-29 15:52:54.8458337 +0000 UTC",
            "organization_url": "https://dev.azure.com/orgname/",
            "timeouts": null
          },
          "sensitive_attributes": []
        }
      ]
    }

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@xuzhang3
Copy link
Collaborator

xuzhang3 commented Feb 7, 2025

Not public API is documented but it seems that the organization ID can be obtained using the API https://{orgname}.vssps.visualstudio.com/_apis/Organization/Collections/me

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

No branches or pull requests

2 participants