Link Search Menu Expand Document

azuread

azuread_application/simple/

destroy.sh

            #!/bin/bash
#../../../bin/destroy.sh azurerm
# Azure AD account required for testing
 

main.tf

            # Summary: A simple Azure Active Directory Application

# Documentation: https://www.terraform.io/docs/language/settings/index.html
terraform {
  required_version = ">= 1.0.0"
  required_providers {
    azuread = {
      source  = "hashicorp/azuread"
      version = "=0.7.0"
    }
  }
}

# Azure AD Application
# Documentation: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application
resource "azuread_application" "changeme_simple_application" {
  name = "changeme-simple-application"
} 

run.sh

            #!/bin/bash
#../../../bin/apply.sh azurerm
# Azure AD account required for testing
 

azuread_group/simple/

destroy.sh

            #!/bin/bash
#../../../bin/destroy.sh azurerm
# Azure AD account required for testing
 

main.tf

            # Summary: A simple Azure Active Directory Group

# Documentation: https://www.terraform.io/docs/language/settings/index.html
terraform {
  required_version = ">= 1.0.0"
  required_providers {
    azuread = {
      source  = "hashicorp/azuread"
      version = "=0.7.0"
    }
  }
}

# Azure AD Group
# Documentation: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/service_principal
resource "azuread_group" "changeme_simple_group" {
  name = "changeme-simple-group-name"
}
 

run.sh

            #!/bin/bash
#../../../bin/apply.sh azurerm
# Azure AD account required for testing
 

azuread_group_member/simple/

destroy.sh

            #!/bin/bash
#../../../bin/destroy.sh azurerm
# Azure AD account required for testing
 

main.tf

            # Summary: A simple Azure Active Directory Group Member assignment

# Documentation: https://www.terraform.io/docs/language/settings/index.html
terraform {
  required_version = ">= 1.0.0"
  required_providers {
    azuread = {
      source  = "hashicorp/azuread"
      version = "=0.7.0"
    }
  }
}

# Azure AD Group
# Documentation: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/group
resource "azuread_group" "changeme_simple_group_member_group" {
  name = "changeme-simple-group-member-group-name"
}

# Azure AD User
# Documentation: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/user
resource "azuread_user" "changeme_simple_group_member_user" {
  user_principal_name = "changeme_simple_azuread_group_member@user.com"
  display_name        = "changeme-simple-azuread-group-member-user-name"
  password            = "changeme-simple-azuread-group-member-user-password"
}

# Azure AD Group Member assignment
# Documentation: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/group_member
resource "azuread_group_member" "changeme_simple_group_member" {
  group_object_id  = azuread_group.changeme_simple_group_member_group.id
  member_object_id = azuread_user.changeme_simple_group_member_user.id
}
 

run.sh

            #!/bin/bash
#../../../bin/apply.sh azurerm
# Azure AD account required for testing
 

azuread_service_principal/simple/

destroy.sh

            #!/bin/bash
#../../../bin/destroy.sh azurerm
# Azure AD account required for testing
 

main.tf

            # Summary: A simple Azure Active Directory Service Principal

# Documentation: https://www.terraform.io/docs/language/settings/index.html
terraform {
  required_version = ">= 1.0.0"
  required_providers {
    azuread = {
      source  = "hashicorp/azuread"
      version = "=0.7.0"
    }
  }
}

# Azure AD Application
# Documentation: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application
resource "azuread_application" "changeme_simple_service_principal_application" {
  name = "changeme-simple-azuread-service-principal-application"
}

# Azure AD Service Principal attached to the Application
# Documentation: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/service_principal
resource "azuread_service_principal" "changeme_simple_service_principal" {
  application_id = azuread_application.changeme_simple_service_principal_application.id
} 

run.sh

            #!/bin/bash
#../../../bin/apply.sh azurerm
# Azure AD account required for testing
 

azuread_user/simple/

destroy.sh

            #!/bin/bash
#../../../bin/destroy.sh azurerm
# Azure AD account required for testing
 

main.tf

            # Summary: A simple Azure Active Directory User

# Documentation: https://www.terraform.io/docs/language/settings/index.html
terraform {
  required_version = ">= 1.0.0"
  required_providers {
    azuread = {
      source  = "hashicorp/azuread"
      version = "=0.7.0"
    }
  }
}

# Azure AD User
# Documentation: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/user
resource "azuread_user" "changeme_simple_user" {
  user_principal_name = "changeme_simple@user.com"
  display_name        = "changeme-simple-user-name"
  password            = "changeme-simple-user-password"
}
 

run.sh

            #!/bin/bash
#../../../bin/apply.sh azurerm
# Azure AD account required for testing