Skip to content

Commit

Permalink
Upgrade to v6 major (#1435)
Browse files Browse the repository at this point in the history
Fixes #1416

Adds an upgrade test for the application resource.

## Migration guide

The property `endDateRelative` has deprecated in favor of `endDate`. If
using `endDateRelative` with a custom `startDate`, calculate the
`endDate` manually and this will avoid requiring replacement of the
resource:
- `azuread.ApplicationCertificate`
- `azuread.ApplicationPassword`
- `azuread.ServicePrincipalCertificate`
- `azuread.ServicePrincipalPassword`

The following deprecated properties are being removed:
-
[azuread.Application](https://www.pulumi.com/registry/packages/azuread/api-docs/application):
`applicationId` removed in favor of `client_id`. This won't cause
replacement.
-
[azuread.ApplicationCertificate](https://www.pulumi.com/registry/packages/azuread/api-docs/applicationcertificate/):
`application_object_id` replaced with `application_id`. This will cause
replacement.
-
[azuread.ApplicationFederatedIdentityCredential](https://www.pulumi.com/registry/packages/azuread/api-docs/applicationfederatedidentitycredential/):
`application_object_id` replaced with `application_id`. This will cause
replacement.
-
[azuread.ApplicationPassword](https://www.pulumi.com/registry/packages/azuread/api-docs/applicationpassword/):
`application_object_id` replaced with `application_id`. This will cause
replacement.
-
[azuread.ApplicationPreAuthorized](https://www.pulumi.com/registry/packages/azuread/api-docs/applicationpreauthorized/):
`application_object_id` replaced with `application_id`. This will cause
replacement.
-
[azuread.DirectoryRoleAssignment](https://www.pulumi.com/registry/packages/azuread/api-docs/directoryroleassignment/)
`application_object_id` replaced with `application_id`. This will cause
replacement.
  • Loading branch information
danielrbradley authored Oct 11, 2024
1 parent 96dcbf4 commit c7d800a
Show file tree
Hide file tree
Showing 231 changed files with 2,077 additions and 4,199 deletions.
6 changes: 3 additions & 3 deletions .ci-mgmt.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
provider: azuread
major-version: 5
major-version: 6
generate-nightly-test-workflow: true
env:
ARM_CLIENT_ID: "d3b6ec3a-36fe-46c9-b3d9-5856a2e0e73c" # test-app
Expand All @@ -21,9 +21,9 @@ plugins:
- name: std
version: "1.4.0"
- name: azure
version: "5.52.0"
version: "6.3.0"
- name: random
version: "4.14.0"
version: "4.16.0"
- name: terraform
version: "1.0.15"
kind: converter
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PACK := azuread
ORG := pulumi
PROJECT := github.com/$(ORG)/pulumi-$(PACK)
PROVIDER_PATH := provider/v5
PROVIDER_PATH := provider/v6
VERSION_PATH := $(PROVIDER_PATH)/pkg/version.Version
TFGEN := pulumi-tfgen-$(PACK)
PROVIDER := pulumi-resource-$(PACK)
Expand All @@ -16,7 +16,7 @@ PULUMI_MISSING_DOCS_ERROR := true

# Override during CI using `make [TARGET] PROVIDER_VERSION=""` or by setting a PROVIDER_VERSION environment variable
# Local & branch builds will just used this fixed default version unless specified
PROVIDER_VERSION ?= 5.0.0-alpha.0+dev
PROVIDER_VERSION ?= 6.0.0-alpha.0+dev
# Use this normalised version everywhere rather than the raw input to ensure consistency.
VERSION_GENERIC = $(shell pulumictl convert-version --language generic --version "$(PROVIDER_VERSION)")

Expand Down Expand Up @@ -120,8 +120,8 @@ install_plugins: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
install_plugins: .pulumi/bin/pulumi
.pulumi/bin/pulumi plugin install resource time 0.0.15
.pulumi/bin/pulumi plugin install resource std 1.4.0
.pulumi/bin/pulumi plugin install resource azure 5.52.0
.pulumi/bin/pulumi plugin install resource random 4.14.0
.pulumi/bin/pulumi plugin install resource azure 6.3.0
.pulumi/bin/pulumi plugin install resource random 4.16.0
.pulumi/bin/pulumi plugin install converter terraform 1.0.15

lint_provider: provider
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![NPM version](https://badge.fury.io/js/%40pulumi%2Fazuread.svg)](https://npmjs.com/package/@pulumi/azuread)
[![NuGet version](https://badge.fury.io/nu/pulumi.azuread.svg)](https://badge.fury.io/nu/pulumi.azured)
[![Python version](https://badge.fury.io/py/pulumi-azuread.svg)](https://pypi.org/project/pulumi-azuread)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-azuread/sdk/v5/go)](https://pkg.go.dev/github.com/pulumi/pulumi-azuread/sdk/v5/go)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-azuread/sdk/v6/go)](https://pkg.go.dev/github.com/pulumi/pulumi-azuread/sdk/v6/go)
[![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-azuread/blob/master/LICENSE)

# Microsoft Azure Active Directory Resource Provider
Expand All @@ -25,51 +25,51 @@ This package is available in many languages in the standard packaging formats.

To use from JavaScript or TypeScript in Node.js, install using either `npm`:

$ npm install @pulumi/azuread
npm install @pulumi/azuread

or `yarn`:

$ yarn add @pulumi/azuread
yarn add @pulumi/azuread

### Python 3

To use from Python, install using `pip`:

$ pip install pulumi-azuread
pip install pulumi-azuread

### Go

To use from Go, use `go get` to grab the latest version of the library

$ go get github.com/pulumi/pulumi-azuread/sdk/v5
go get github.com/pulumi/pulumi-azuread/sdk/v6

### .NET

To use from .NET, install using `dotnet add package`:

$ dotnet add package Pulumi.Azuread
dotnet add package Pulumi.Azuread

## Configuration

The following configuration points are available:

- `azuread:clientId` - The Client ID which should be used. This can also be sourced from the `ARM_CLIENT_ID` Environment
- `azuread:clientId` - The Client ID which should be used. This can also be sourced from the `ARM_CLIENT_ID` Environment
Variable.
- `azuread:tenantId` - The Tenant ID which should be used. This can also be sourced from the `ARM_TENANT_ID` Environment
- `azuread:tenantId` - The Tenant ID which should be used. This can also be sourced from the `ARM_TENANT_ID` Environment
Variable.
- `azuread:clientSecret` - The Client Secret which should be used. This can also be sourced from the `ARM_CLIENT_SECRET`
- `azuread:clientSecret` - The Client Secret which should be used. This can also be sourced from the `ARM_CLIENT_SECRET`
Environment Variable.
- `azuread:certificatePassword` - The password associated with the Client Certificate. This can also be sourced from
- `azuread:certificatePassword` - The password associated with the Client Certificate. This can also be sourced from
the `ARM_CLIENT_CERTIFICATE_PASSWORD` Environment Variable.
- `azuread:clientCertificatePath` - The path to the Client Certificate associated with the Service Principal which should
- `azuread:clientCertificatePath` - The path to the Client Certificate associated with the Service Principal which should
be used. This can also be sourced from the `ARM_CLIENT_CERTIFICATE_PATH` Environment Variable.
- `azuread:environment` - The Cloud Environment which be used. Possible values are public, usgovernment, german and china.
- `azuread:environment` - The Cloud Environment which be used. Possible values are public, usgovernment, german and china.
Defaults to `public`. This can also be sourced from the `ARM_ENVIRONMENT` environment variable.
- `azuread:msiEndpoint` - The path to a custom endpoint for Managed Service Identity - in most circumstances this should
be detected automatically. This can also be sourced from the `ARM_MSI_ENDPOINT` Environment Variable.
- `azuread:useMsi` - Should Managed Service Identity be used for Authentication? This can also be sourced from the
- `azuread:useMsi` - Should Managed Service Identity be used for Authentication? This can also be sourced from the
`ARM_USE_MSI` Environment Variable. Defaults to `false`.

## Reference

For further information, please visit [the AzureAD provider docs](https://www.pulumi.com/registry/packages/azuread/) or for detailed reference documentation, please visit [the API docs](https://www.pulumi.com/registry/packages/azuread/api-docs/).
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/pulumi/pulumi-azuread/examples/v5
module github.com/pulumi/pulumi-azuread/examples/v6

go 1.21

Expand Down
3 changes: 0 additions & 3 deletions provider/cmd/pulumi-resource-azuread/bridge-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1227,9 +1227,6 @@
"azuread_service_principals": {
"current": "azuread:index/getServicePrincipals:getServicePrincipals",
"fields": {
"application_ids": {
"maxItemsOne": false
},
"client_ids": {
"maxItemsOne": false
},
Expand Down
4 changes: 2 additions & 2 deletions provider/cmd/pulumi-resource-azuread/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"

azuread "github.com/pulumi/pulumi-azuread/provider/v5"
"github.com/pulumi/pulumi-azuread/provider/v5/pkg/version"
azuread "github.com/pulumi/pulumi-azuread/provider/v6"
"github.com/pulumi/pulumi-azuread/provider/v6/pkg/version"
)

//go:embed schema-embed.json
Expand Down
440 changes: 138 additions & 302 deletions provider/cmd/pulumi-resource-azuread/schema.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions provider/cmd/pulumi-tfgen-azuread/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package main
import (
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen"

azuread "github.com/pulumi/pulumi-azuread/provider/v5"
"github.com/pulumi/pulumi-azuread/provider/v5/pkg/version"
azuread "github.com/pulumi/pulumi-azuread/provider/v6"
"github.com/pulumi/pulumi-azuread/provider/v6/pkg/version"
)

func main() {
Expand Down
62 changes: 31 additions & 31 deletions provider/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/pulumi/pulumi-azuread/provider/v5
module github.com/pulumi/pulumi-azuread/provider/v6

go 1.22.0

toolchain go1.22.7

require (
github.com/hashicorp/go-azure-sdk/sdk v0.20240411.1104331
github.com/hashicorp/go-azure-sdk/sdk v0.20240927.1005214
github.com/hashicorp/terraform-provider-azuread/shim v0.0.0
github.com/pulumi/providertest v0.1.2
github.com/pulumi/providertest v0.1.3
github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0
github.com/pulumi/pulumi/sdk/v3 v3.136.1
github.com/stretchr/testify v1.9.0
Expand All @@ -21,7 +21,7 @@ replace (

require (
cloud.google.com/go v0.112.1 // indirect
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/kms v1.15.7 // indirect
cloud.google.com/go/logging v1.9.0 // indirect
Expand All @@ -40,7 +40,7 @@ require (
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.3-proton // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
Expand Down Expand Up @@ -75,7 +75,7 @@ require (
github.com/charmbracelet/x/term v0.1.1 // indirect
github.com/charmbracelet/x/windows v0.1.2 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/cloudflare/circl v1.3.9 // indirect
github.com/cloudflare/circl v1.4.0 // indirect
github.com/cyphar/filepath-securejoin v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set/v2 v2.5.0 // indirect
Expand All @@ -84,7 +84,7 @@ require (
github.com/emirpasic/gods v1.18.1 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
Expand All @@ -110,7 +110,8 @@ require (
github.com/gorilla/mux v1.8.0 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-azure-helpers v0.66.2 // indirect
github.com/hashicorp/go-azure-helpers v0.71.0 // indirect
github.com/hashicorp/go-azure-sdk/microsoft-graph v0.20240927.1005214 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
Expand All @@ -125,19 +126,19 @@ require (
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.6 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.6.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.9.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/hcl/v2 v2.21.0 // indirect
github.com/hashicorp/hcl/v2 v2.22.0 // indirect
github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.20.0 // indirect
github.com/hashicorp/terraform-json v0.21.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
github.com/hashicorp/terraform-json v0.22.1 // indirect
github.com/hashicorp/terraform-plugin-go v0.24.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect
github.com/hashicorp/terraform-plugin-testing v1.5.1 // indirect
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20240628163743-6594e1c6cd59 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect
github.com/hashicorp/terraform-plugin-testing v1.10.0 // indirect
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20240927131909-8f628d164c64 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/vault/api v1.12.0 // indirect
Expand All @@ -153,7 +154,6 @@ require (
github.com/klauspost/compress v1.15.11 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/manicminer/hamilton v0.71.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
Expand Down Expand Up @@ -223,7 +223,7 @@ require (
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yuin/goldmark v1.7.4 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
Expand All @@ -233,28 +233,28 @@ require (
go.uber.org/atomic v1.11.0 // indirect
gocloud.dev v0.37.0 // indirect
gocloud.dev/secrets/hashivault v0.37.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20240707233637-46b078467d37 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.23.0 // indirect
golang.org/x/tools v0.25.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/api v0.169.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/grpc v1.66.2 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.67.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/frand v1.4.2 // indirect
software.sslmate.com/src/go-pkcs12 v0.4.0 // indirect
software.sslmate.com/src/go-pkcs12 v0.5.0 // indirect
)
Loading

0 comments on commit c7d800a

Please sign in to comment.