Skip to content

Add polling to azuread_application_registration create - #1803

Open
1oglop1 wants to merge 1 commit into
hashicorp:mainfrom
jans-forks:main
Open

Add polling to azuread_application_registration create#1803
1oglop1 wants to merge 1 commit into
hashicorp:mainfrom
jans-forks:main

Conversation

@1oglop1

@1oglop1 1oglop1 commented Nov 18, 2025

Copy link
Copy Markdown

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

Resolves #1802

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevant documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

I verified this works by manually testing.

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):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #1802

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the provider.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@MaxPowers1337

MaxPowers1337 commented Nov 21, 2025

Copy link
Copy Markdown

would be awesome to cover also "azuread_application" using this method.

Thats probably the corresponding file, which also needs fixing.
https://github.com/hashicorp/terraform-provider-azuread/blob/9f777b739817844ebf256a3c07cb834fb3a57e52/internal/services/applications/application_resource.go

It seems that there are a lot more resources affected by this issue, though.

@digilabadmin

Copy link
Copy Markdown

Could also put in a similar fix for issue Timed out whilst waiting for new service principal to be replicated in Azure

@jasonhurst

jasonhurst commented Nov 26, 2025

Copy link
Copy Markdown

I Forked this repo, Applied this fix, and published it to the Terraform Registry and it doesn't seem to fix the issue unless I'm missing something.

https://registry.terraform.io/providers/jasonhurst/azuread/latest (use v3.7.3 for this fix alone. v3.7.5 was an attempt to also fix the SPN creation)

Here are the changes I made: jasonhurst/terraform-provider-azuread@v3.7.0...v3.7.2

Here is the error I get (which I believe is the same error for the azurad_applicaiton_registration that you receive when using the official provider.)

│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ module.casetivity[0].module.ecs.azuread_application_registration.casetivity,
│ provider "provider[\"[registry.terraform.io/hashicorp/azuread](http://registry.terraform.io/hashicorp/azuread)\"]" produced
│ an unexpected new value: Root object was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵

@ms-henglu

Copy link
Copy Markdown

Hi @jasonhurst ,

│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ module.casetivity[0].module.ecs.azuread_application_registration.casetivity,
│ provider "provider[\"[registry.terraform.io/hashicorp/azuread](http://registry.terraform.io/hashicorp/azuread)\"]" produced
│ an unexpected new value: Root object was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

It seems you're still using the hashicorp azuread instead your own forked provider.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to create azuread_application_registration with service principal credentials

6 participants