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_service_principal: export the oauth2_permissions property #103

Merged
merged 4 commits into from
Jun 11, 2019
Merged

azuread_service_principal: export the oauth2_permissions property #103

merged 4 commits into from
Jun 11, 2019

Conversation

joakimhellum
Copy link
Contributor

@joakimhellum joakimhellum commented Jun 10, 2019

Use case is to read permissions from "Microsoft Applications", for example:

data "azuread_service_principal" "main" {
  display_name = "Microsoft Graph"
}

output "oauth2_permissions" {
  value = data.azuread_service_principal.main.oauth2_permissions
}
  • Run make testacc TESTARGS='-run=TestAccAzureADServicePrincipalDataSource_byApplicationId'
  • Run make testacc TESTARGS='-run=TestAccAzureADServicePrincipal_basic'
  • Make adjustments after SDK upgrade

@katbyte
Copy link
Collaborator

katbyte commented Jun 10, 2019

Hi @joakimhellum-in,

Thank you for the PR, but i'm going to hold off reviewing this until #102 is merged (or you rebase off said PR) as the SDK changes to a largest degree.

@ghost ghost added size/L and removed size/M labels Jun 10, 2019
@joakimhellum joakimhellum changed the title Data Source azuread_service_principal: export the oauth2_permissions property azuread_service_principal: export the oauth2_permissions property Jun 10, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some comments inline here @joakimhellum-in, the main concern is the duplicated schema and code. If we could share all that in a graph.SchemaOauth2Permissions function & graph.[Expand|Flatten]Oauth2Permissions that would be great.

azuread/data_service_principal.go Outdated Show resolved Hide resolved
azuread/resource_service_principal.go Outdated Show resolved Hide resolved
azuread/resource_service_principal.go Outdated Show resolved Hide resolved
azuread/resource_service_principal.go Outdated Show resolved Hide resolved
@joakimhellum
Copy link
Contributor Author

@katbyte Thanks for your patience. Have made an attempt to address code review comments.

@ghost ghost removed the waiting-response label Jun 10, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the revisions @joakimhellum-in! perfect 👌👍

@katbyte katbyte merged commit cdc2644 into hashicorp:master Jun 11, 2019
katbyte added a commit that referenced this pull request Jun 11, 2019
@ghost
Copy link

ghost commented Jul 12, 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 Jul 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants