Giter Site home page Giter Site logo

tsrobworld / terraform-provider-azuread Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hashicorp/terraform-provider-azuread

0.0 0.0 0.0 20.15 MB

Terraform provider for Azure Active Directory

Home Page: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs

License: Mozilla Public License 2.0

Shell 0.90% Go 97.53% Kotlin 1.21% Makefile 0.36% HCL 0.02%

terraform-provider-azuread's Introduction

Terraform logo

Terraform Provider for Azure Active Directory

NOTE: Version 1.0 and above of this provider requires Terraform 0.12 or later.

Usage Example

# Configure Terraform
terraform {
  required_providers {
    azuread = {
      source  = "hashicorp/azuread"
      version = "~> 2.7.0"
    }
  }
}

# Configure the Azure Active Directory Provider
provider "azuread" {

  # NOTE: Environment Variables can also be used for Service Principal authentication
  # Terraform also supports authenticating via the Azure CLI too.
  # See official docs for more info: https://registry.terraform.io/providers/hashicorp/azuread/latest/docs

  # client_id     = "..."
  # client_secret = "..."
  # tenant_id     = "..."
}

# Retrieve domain information
data "azuread_domains" "example" {
  only_initial = true
}

# Create an application
resource "azuread_application" "example" {
  name = "ExampleApp"
}

# Create a service principal
resource "azuread_service_principal" "example" {
  application_id = azuread_application.example.application_id
}

# Create a user
resource "azuread_user" "example" {
  user_principal_name = "ExampleUser@${data.azuread_domains.example.domains.0.domain_name}"
  display_name        = "Example User"
  password            = "..."
}

Further usage documentation is available on the Terraform website.

Developer Requirements

  • Terraform 0.12.x or later
  • Go 1.16.x (to build the provider plugin)

If you're building on Windows, you will also need:

For GNU32 Make, make sure its bin path is added to your PATH environment variable.

For Git Bash for Windows, at the step of "Adjusting your PATH environment", please choose "Use Git and optional Unix tools from Windows Command Prompt".

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.16+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

Clone the repository to: $GOPATH/src/github.com/hashicorp/terraform-provider-azuread

$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
$ git clone https://github.com/hashicorp/terraform-provider-azuread

Change to the clone directory and run make tools to install the dependent tooling needed to test and build the provider.

To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.

$ make tools
...
$ make build
...
$ $GOPATH/bin/terraform-provider-azuread
...

In order to test the provider, you can simply run make test.

$ make test

The majority of tests in the provider are Acceptance Tests - which provisions real resources in Azure. It's possible to run the entire acceptance test suite by running make testacc - however it's likely you'll want to run a subset, which you can do using a prefix, by running:

make testacc TESTARGS='-run=TestAccApplication'

The following ENV variables must be set in your shell prior to running acceptance tests:

  • ARM_CLIENT_ID
  • ARM_CLIENT_SECRET
  • ARM_TENANT_ID
  • ARM_TEST_LOCATION
  • ARM_TEST_LOCATION_ALT

NOTE: Acceptance tests create real resources, and may cost money to run.

terraform-provider-azuread's People

Contributors

manicminer avatar katbyte avatar tombuildsstuff avatar alexwilcox9 avatar ccadruvi avatar markdordoy avatar tiwood avatar stawik-mesa avatar swissgipfel avatar threpio avatar erikrok avatar patrickmarabeas avatar radeksimko avatar appilon avatar tsanton avatar jackofallops avatar audunsolemdal avatar robertbrandso avatar rayterrill avatar daramir avatar jeanneryan avatar tagur87 avatar tracypholmes avatar stefanschoof avatar landro avatar michaelmingram avatar justincampbell avatar janschumann avatar brunhil avatar hfurubotten avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.