dependencies: update go-azure-sdk to v0.20250131.1134653#28674
dependencies: update go-azure-sdk to v0.20250131.1134653#28674jackofallops merged 13 commits intohashicorp:mainfrom
Conversation
jackofallops
left a comment
There was a problem hiding this comment.
Thanks @magodo - As discussed offline, I've pushed some changes to expose the new property for users. Can you check it's working as expected with your ADO setup and post any results you are able to before we merge?
Thanks
…also add framework config env vars
|
Hi @jackofallops, I've made some more commits to fix a couple of missing parts. Now it behaves correctly, see the tests below. Note that all the tests below uses the tool Github Actionname: terraform-azurerm-provider OIDC test
on: [workflow_dispatch]
permissions:
id-token: write
contents: read
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout terraform-provider-azurerm repo'
uses: actions/checkout@v4
with:
repository: 'magodo/terraform-provider-azurerm'
ref: 'sdk_v0.20250131.1134653'
- name: 'Setup Go'
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: 'Unit Test'
run: |
export TF_ACC=1
export ARM_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }}
export ARM_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
export ARM_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }}
go test -v -run="TestAccProvider_githubOidcAuth" ./internal/provider
- name: 'E2E Test'
run: |
# Install provider
go install
# Install terraform-client-import
go install github.com/magodo/terraform-client-go/cmd/terraform-client-import@main
# Import a RG
export ARM_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }}
export ARM_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
export ARM_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }}
export ARM_PROVIDER_ENHANCED_VALIDATION=1
export ARM_RESOURCE_PROVIDER_REGISTRATIONS=none
export ARM_USE_OIDC=true
~/go/bin/terraform-client-import -type azurerm_resource_group -id /subscriptions/${ARM_SUBSCRIPTION_ID}/resourceGroups/zhwen-domain -path ~/go/bin/terraform-provider-azurermAzure Pipelinetrigger:
- none
pool:
vmImage: 'ubuntu-latest'
resources:
repositories:
- repository: terraform-provider-azurerm
type: github
endpoint: magodo-pat-read-public-repo
name: magodo/terraform-provider-azurerm
ref: sdk_v0.20250131.1134653
steps:
- task: GoTool@0
inputs:
version: '1.23.3'
- checkout: terraform-provider-azurerm
- task: AzureCLI@2
inputs:
azureSubscription: $(CONNECTION_ID)
scriptType: bash
scriptLocation: "inlineScript"
inlineScript: |
set -e
# Unit Test
go test -v -run="TestAccProvider_adoOidcAuth" ./internal/provider
# E2E Test
go install
go install github.com/magodo/terraform-client-go/cmd/terraform-client-import@main
~/go/bin/terraform-client-import -type azurerm_resource_group -id /subscriptions/${ARM_SUBSCRIPTION_ID}/resourceGroups/zhwen-domain -path ~/go/bin/terraform-provider-azurerm
env:
TF_ACC: 1
ARM_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
ARM_TENANT_ID: $(AZURE_TENANT_ID)
ARM_CLIENT_ID: $(AZURE_CLIENT_ID)
ARM_ADO_PIPELINE_SERVICE_CONNECTION_ID: $(CONNECTION_ID)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
SYSTEM_OIDCREQUESTURI: $(System.OidcRequestUri)
ARM_PROVIDER_ENHANCED_VALIDATION: 1
ARM_RESOURCE_PROVIDER_REGISTRATIONS: none
ARM_USE_OIDC: trueThe remaining question is that are we fine with the current solution, especially for the auth method selection, based on whether the ADO service connection is specified or not, to choose between Github auth and ADO auth. This won't work if we need to support a 3rd platform with OIDC. One possible solution is to convert the toggles of The root issue here is that the interface of Anyway, we can plan to do any of the above in another PR if needed. Whilst, I think we still need to update the provider document in this PR? |
|
Thanks for the change @magodo - As discussed offline, I agree this PR should also update the Thanks again! |
|
Fixes #17143 |
|
@jackofallops Thanks! I've updated both the service_principal_oidc.html.markdown and the index.html.markdown. Please take another look! |
jackofallops
left a comment
There was a problem hiding this comment.
Thanks @magodo - I've made some wording change suggestions below if you can take a look? As soon as they're addressed I'll get this approved and merged.
Thanks!
Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com>
Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com>
Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com>
Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com>
jackofallops
left a comment
There was a problem hiding this comment.
Thanks @magodo - this LGTM now 👍
* CHANGELOG.md for v4.18.0 * Update CHANGELOG.md for #28308 * Update for #28447 * Update for #28532 * Update for #28537 * Update CHANGELOG.md for #28674 * Update for #28363 * Update for #28536 * Update for #28416 * Update CHANGELOG.md #28700 * Update for #28673 * Update for #28308 Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com> * Update for #27533 * prep for release --------- Co-authored-by: stephybun <steph@hashicorp.com> Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com>
…8674) * dependencies: update go-azure-sdk to v0.20250131.1134653 * Update test * removing unused function * add ado_pipeline_service_connection_id config option * Add provider test for ADO pipeline * Add the missing `ADOPipelineServiceConnectionID` in the auth config, also add framework config env vars * Default value shall be nil instead of `false` * Update docs * terrafmt * Update website/docs/guides/service_principal_oidc.html.markdown Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> * Update website/docs/index.html.markdown Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> * Update website/docs/index.html.markdown Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> * Update website/docs/index.html.markdown Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com> --------- Co-authored-by: jackofallops <ste@hashicorp.com> Co-authored-by: jackofallops <11830746+jackofallops@users.noreply.github.com>
* CHANGELOG.md for v4.18.0 * Update CHANGELOG.md for hashicorp#28308 * Update for hashicorp#28447 * Update for hashicorp#28532 * Update for hashicorp#28537 * Update CHANGELOG.md for hashicorp#28674 * Update for hashicorp#28363 * Update for hashicorp#28536 * Update for hashicorp#28416 * Update CHANGELOG.md hashicorp#28700 * Update for hashicorp#28673 * Update for hashicorp#28308 Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com> * Update for hashicorp#27533 * prep for release --------- Co-authored-by: stephybun <steph@hashicorp.com> Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com>
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |


Community Note
Description
Update the go-azure-sdk to v0.20250131.1134653, with a couple of fixes below:
GtihubOIDCRequest(URL|Token)fields in the sdk has been renamed to removing theGithubprefix. Tested below.ParameterValuesfield, causing a compile error. Tested below.PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Provider Github OIDC Test
API Connection
terraform-provider-azurerm on main via 🐹 v1.23.3 💤 TF_ACC=1 go test -v -timeout=20h -parallel=20 -run=TestAccApiConnection_complete ./internal/services/connections === RUN TestAccApiConnection_complete === PAUSE TestAccApiConnection_complete === CONT TestAccApiConnection_complete --- PASS: TestAccApiConnection_complete (250.39s) PASS ok github.com/hashicorp/terraform-provider-azurerm/internal/services/connections 250.418sChange Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
This is a (please select all that apply):
Related Issue(s)
Fixes #17143
Note
If this PR changes meaningfully during the course of review please update the title and description as required.