-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
dependencies: update go-azure-sdk to v0.20250131.1134653 #28674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-azurerm Azure 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: true The 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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Co-authored-by: jackofallops <[email protected]>
Co-authored-by: jackofallops <[email protected]>
Co-authored-by: jackofallops <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]> * Update for #27533 * prep for release --------- Co-authored-by: stephybun <[email protected]> Co-authored-by: sreallymatt <[email protected]> Co-authored-by: Wodans Son <[email protected]>
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 theGithub
prefix. Tested below.ParameterValues
field, 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.418s
Change 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.