Skip to content

Commit b536e2e

Browse files
app registration data module (#27)
Co-authored-by: zjanura <[email protected]>
1 parent 9da2efe commit b536e2e

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

app_registration/main.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
terraform {
2+
required_version = "~> 1.3"
3+
4+
required_providers {
5+
azurerm = {
6+
source = "hashicorp/azurerm"
7+
version = "~> 3.48"
8+
}
9+
}
10+
backend "azurerm" {}
11+
}
12+
13+
provider "azurerm" {
14+
features {}
15+
}
16+
17+
data "azuread_application" "registration" {
18+
display_name = var.app_registration_name
19+
}

app_registration/outputs.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
output "application_object_id" {
2+
value = data.azuread_application.registration.object_id
3+
}
4+
5+
output "application_client_id" {
6+
value = data.azuread_application.registration.client_id
7+
}

app_registration/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
variable "app_registration_name" {
2+
type = string
3+
description = "The name of the app registration"
4+
}

0 commit comments

Comments
 (0)