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

fix(azure): use object id instead of principal id #71

Merged
merged 1 commit into from
Sep 8, 2020
Merged

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Sep 8, 2020

The documentation for the application_password resource says:

application_object_id - (Required) The Object ID of the Application
for which this password should be created. Changing this field forces
a new resource to be created.

https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_password#application_object_id

We were using the wrong id. 🤦

Signed-off-by: Salim Afiune Maya [email protected]

@afiune afiune added the bug Something isn't working label Sep 8, 2020
@afiune afiune requested a review from scottford-lw September 8, 2020 16:35
@afiune afiune self-assigned this Sep 8, 2020
The documentation for the `application_password` resource says:
>`application_object_id` - (Required) The Object ID of the Application
>for which this password should be created. Changing this field forces
>a new resource to be created.

https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application_password#application_object_id

We were using the wrong id. 🤦

Signed-off-by: Salim Afiune Maya <[email protected]>
@@ -98,7 +98,7 @@ resource "azurerm_role_assignment" "grant_reader_role_to_subscriptions" {
count = var.create ? length(data.azurerm_subscriptions.available.subscriptions) : 0
scope = "/subscriptions/${data.azurerm_subscriptions.available.subscriptions[count.index].subscription_id}"

principal_id = azuread_service_principal.lacework[0].id
principal_id = local.service_principal_id
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just using the service principal id defined above in the locals {} block.

Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

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

⭐ 👍

@afiune afiune merged commit 78d7dd1 into master Sep 8, 2020
@afiune afiune deleted the afiune/az/fix branch September 10, 2020 22:29
This was referenced Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants