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

AzureAD Application URL's being modified #6

Closed
guri-s opened this issue Nov 15, 2018 · 4 comments · Fixed by #21
Closed

AzureAD Application URL's being modified #6

guri-s opened this issue Nov 15, 2018 · 4 comments · Fixed by #21

Comments

@guri-s
Copy link

guri-s commented Nov 15, 2018

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 AzureRM Provider) Version

Affected Resource(s)

azurerm_azuread_application.sampleapp

Terraform Configuration Files

resource "azurerm_azuread_application" "sampleapp" {
  name                       = "SampleApp"
  homepage                   = "https://sampleapp.com/"
  identifier_uris            = [
                                "https://sampleapp.com/",
                                "https://sampleapp.onmicrosoft.com/00000000-0000-0000-0000-00000000"
                                ]
  reply_urls                 = [
                                "https://my.sampleapp.com/"
                                       ]
  available_to_other_tenants = false
  oauth2_allow_implicit_flow = false
}

resource "azurerm_azuread_service_principal" "sampleapp" {
  application_id = "00000000-0000-0000-0000-000000000000"
}

Expected Behavior

The azuread_application was imported in Terraform azurerm provider version = 1.15. So nothing is expected to happen as the .tf files have not been modified.

Actual Behavior

Now after when the provider was updated to version 1.18 and also on 1.19, terraform wants to modify the reply url's as below:
~ azurerm_azuread_application.cognos reply_urls.1: "https://sampleapp.onmicrosoft.com/00000000-0000-0000-0000-00000000" => "https://my.sampleapp.com/"

As per the .tf file for the app, the Reply URL is correct but terraform wants to modify it & the terraform state file also has the correct reply URL when I looked at the state file.

But when running terraform plan it thinks that the IdentifierURI is the Reply URL & wants to modify when in reality they are correct. Its confused into thinking that IdentifierURI is the Reply URL when the state file has it correct.

Now I can get away with this without putting the Reply URL or Identifier URI in the .tf file as below:

resource "azurerm_azuread_application" "sampleapp" {
  name                       = "SampleApp"
  homepage                   = "https://sampleapp.com/"
  available_to_other_tenants = false
  oauth2_allow_implicit_flow = false
}

resource "azurerm_azuread_service_principal" "sampleapp" {
  application_id = "00000000-0000-0000-0000-000000000000"
}

running hcl terrfaform plan with the above file does not result into terraform wanting to do any modification.

This looks like a bug in the newer provider version as the same config worked in previous versions without any issues.

Steps to Reproduce

  1. terraform plan

Important Factoids

References

  • #0000
@katbyte
Copy link
Collaborator

katbyte commented Jan 10, 2019

Hi @guri-s,

As in 2.0 we are deprecating all Azure AD resources and data sources in the Azure RM provider in favour of this new provider I have moved the issue here.

@katbyte katbyte transferred this issue from hashicorp/terraform-provider-azurerm Jan 10, 2019
@katbyte
Copy link
Collaborator

katbyte commented Jan 22, 2019

Hi @guri-s,

Sorry to see that azurerm v1.19 broke your process. A typo introduced a bug and I have fixed it here in #21 and back ported the fix to azurerm.

@katbyte katbyte added this to the 0.2.0 milestone Jan 22, 2019
@guri-s
Copy link
Author

guri-s commented Jan 22, 2019

@katbyte
thanks, will test & report back once new version on the provider is rolled out.

@ghost
Copy link

ghost commented Mar 5, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants