blinqas / station

Use Station to create secure and automated environments for your workloads in Azure
MIT License
7 stars 1 forks source link

feat: added support for creating a service prinicpal for the application #137

Closed SanderBlom closed 3 months ago

SanderBlom commented 4 months ago

Added support for optionally creating a service principal when creating an application

Description

This should give us the option to create a service principal (Enterprise application) in the applications block

Fixes #136

Type of Change

Testing

See the testing docs for more information about how to test your code

Checklist

Before submitting this PR, please ensure the following:

Additional Information

Provide any additional information or context about the pull request here.


Thank you for contributing to Station!

SanderBlom commented 4 months ago

Det ser ut til at man kun kan opprette en Enterprise Application slik det er lagt opp nå - jeg tenker vi like gjerne kan støtte flere (hvis det er mulig).

Ser ikke ut som det er mulig å ha en-til-mange forhold mellom applikasjoner (app registrations) og service principals (enterprise applications).

Når jeg laget et map med to objecter så får jeg denne feilmeldingen:

│ Error: Could not create service principal
│ 
│   with module.station-applications.module.applications["maximum"].azuread_service_principal.sp["maximum"],
│   on ../application/azuread_application.tf line 126, in resource "azuread_service_principal" "sp":
│  126: resource "azuread_service_principal" "sp" {
│ 
│ ServicePrincipalsClient.BaseClient.Post(): unexpected status 409 with OData error:
│ Request_MultipleObjectsWithSameKeyValue: The service principal cannot be created, updated, or restored because the
│ service principal name b1712237-5c04-4016-97bd-707613ae404e is already in use.
╵

@kimfy