Skip to content

Commit

Permalink
Merge pull request #225 from pulumi/jkodroff/v2.13.0
Browse files Browse the repository at this point in the history
Upgrade to v2.13.0 of the AzureAD Terraform Provider
  • Loading branch information
jkodroff authored Dec 16, 2021
2 parents b74d5cf + da40a52 commit 605c429
Show file tree
Hide file tree
Showing 22 changed files with 817 additions and 61 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHANGELOG
=========

## HEAD (Unreleased)
_(none)_
* Upgrade to v2.13.0 of the AzureAD Terraform Provider

---

Expand Down
95 changes: 87 additions & 8 deletions provider/cmd/pulumi-resource-azuread/schema.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ github.com/hashicorp/terraform-plugin-sdk v1.7.0 h1:B//oq0ZORG+EkVrIJy0uPGSonvmX
github.com/hashicorp/terraform-plugin-sdk v1.7.0/go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY=
github.com/hashicorp/terraform-plugin-test v1.2.0 h1:AWFdqyfnOj04sxTdaAF57QqvW7XXrT8PseUHkbKsE8I=
github.com/hashicorp/terraform-plugin-test v1.2.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211203005521-263fec82c603 h1:aD3QoJjbVw+H0JW0fvFy9GaAVRxjuAOzHbI+X4ssoM8=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211203005521-263fec82c603/go.mod h1:akELz8UE/bYFGyGEHyzqjlJ8H/7jwKS4XmiWeG4EBPk=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211215222804-a7f59c2ea5f7 h1:j9ubszR1N9yV9vaGO0gh+4VEdywapmUTyAEy6TxQeow=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211215222804-a7f59c2ea5f7/go.mod h1:3V/KoqG90XZ88UHXjP0XzCLk0ObdGRvnwYhJd+qL81s=
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
github.com/hashicorp/terraform-svchost v0.0.0-20191119180714-d2e4933b9136 h1:81Dg7SK6Q5vzqFItO8e1iIF2Nj8bLXV23NXjEgbev/s=
github.com/hashicorp/terraform-svchost v0.0.0-20191119180714-d2e4933b9136/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
Expand Down Expand Up @@ -564,8 +564,8 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx
github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lib/pq v1.10.1/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/manicminer/hamilton v0.36.1 h1:rIHUAYP54u70yGcl1HZjo3/DXx7B6npzVFnDSVduttQ=
github.com/manicminer/hamilton v0.36.1/go.mod h1:IOYn2Dc9SUiZ7Ryw6c8Ay795vPPMnrCZe3MktS447dc=
github.com/manicminer/hamilton v0.38.0 h1:8MWpSyfgGrf7vmjTWU3/OQk1+RXYixf2in6pPrTkIRc=
github.com/manicminer/hamilton v0.38.0/go.mod h1:IOYn2Dc9SUiZ7Ryw6c8Ay795vPPMnrCZe3MktS447dc=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
Expand Down
2 changes: 1 addition & 1 deletion provider/shim/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.15

require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211203005521-263fec82c603
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211215222804-a7f59c2ea5f7
)

replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20201218231525-9cca98608a5e
8 changes: 4 additions & 4 deletions provider/shim/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ github.com/hashicorp/terraform-json v0.8.0 h1:XObQ3PgqU52YLQKEaJ08QtUshAfN3yu4u8
github.com/hashicorp/terraform-json v0.8.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE=
github.com/hashicorp/terraform-plugin-go v0.1.0 h1:kyXZ0nkHxiRev/q18N40IbRRk4AV0zE/MDJkDM3u8dY=
github.com/hashicorp/terraform-plugin-go v0.1.0/go.mod h1:10V6F3taeDWVAoLlkmArKttR3IULlRWFAGtQIQTIDr4=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211203005521-263fec82c603 h1:aD3QoJjbVw+H0JW0fvFy9GaAVRxjuAOzHbI+X4ssoM8=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211203005521-263fec82c603/go.mod h1:akELz8UE/bYFGyGEHyzqjlJ8H/7jwKS4XmiWeG4EBPk=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211215222804-a7f59c2ea5f7 h1:j9ubszR1N9yV9vaGO0gh+4VEdywapmUTyAEy6TxQeow=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20211215222804-a7f59c2ea5f7/go.mod h1:3V/KoqG90XZ88UHXjP0XzCLk0ObdGRvnwYhJd+qL81s=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20210316155119-a95892c5f864 h1:Y4V+SFe7d3iH+9pJCoeWIOS5/xBJIFsltS7E+KJSsJY=
Expand Down Expand Up @@ -292,8 +292,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/manicminer/hamilton v0.36.1 h1:rIHUAYP54u70yGcl1HZjo3/DXx7B6npzVFnDSVduttQ=
github.com/manicminer/hamilton v0.36.1/go.mod h1:IOYn2Dc9SUiZ7Ryw6c8Ay795vPPMnrCZe3MktS447dc=
github.com/manicminer/hamilton v0.38.0 h1:8MWpSyfgGrf7vmjTWU3/OQk1+RXYixf2in6pPrTkIRc=
github.com/manicminer/hamilton v0.38.0/go.mod h1:IOYn2Dc9SUiZ7Ryw6c8Ay795vPPMnrCZe3MktS447dc=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
Expand Down
9 changes: 8 additions & 1 deletion sdk/dotnet/GetGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ public sealed class GetGroupResult
/// </summary>
public readonly string DisplayName;
/// <summary>
/// A `dynamic_membership` block as documented below.
/// </summary>
public readonly ImmutableArray<Outputs.GetGroupDynamicMembershipResult> DynamicMemberships;
/// <summary>
/// The provider-assigned unique ID for this managed resource.
/// </summary>
public readonly string Id;
Expand Down Expand Up @@ -243,7 +247,7 @@ public sealed class GetGroupResult
/// </summary>
public readonly string Theme;
/// <summary>
/// A list of group types configured for the group. The only supported type is `Unified`, which specifies a Microsoft 365 group.
/// A list of group types configured for the group. Supported values are `DynamicMembership`, which denotes a group with dynamic membership, and `Unified`, which specifies a Microsoft 365 group.
/// </summary>
public readonly ImmutableArray<string> Types;
/// <summary>
Expand All @@ -261,6 +265,8 @@ private GetGroupResult(

string displayName,

ImmutableArray<Outputs.GetGroupDynamicMembershipResult> dynamicMemberships,

string id,

string mail,
Expand Down Expand Up @@ -303,6 +309,7 @@ private GetGroupResult(
Behaviors = behaviors;
Description = description;
DisplayName = displayName;
DynamicMemberships = dynamicMemberships;
Id = id;
Mail = mail;
MailEnabled = mailEnabled;
Expand Down
30 changes: 24 additions & 6 deletions sdk/dotnet/Group.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public partial class Group : Pulumi.CustomResource
[Output("displayName")]
public Output<string> DisplayName { get; private set; } = null!;

/// <summary>
/// A `dynamic_membership` block as documented below. Required when `types` contains `DynamicMembership`. Cannot be used with the `members` property.
/// </summary>
[Output("dynamicMembership")]
public Output<Outputs.GroupDynamicMembership?> DynamicMembership { get; private set; } = null!;

/// <summary>
/// The SMTP address for the group.
/// </summary>
Expand All @@ -76,7 +82,7 @@ public partial class Group : Pulumi.CustomResource
public Output<string> MailNickname { get; private set; } = null!;

/// <summary>
/// A set of members who should be present in this group. Supported object types are Users, Groups or Service Principals.
/// A set of members who should be present in this group. Supported object types are Users, Groups or Service Principals. Cannot be used with the `dynamic_membership` block.
/// </summary>
[Output("members")]
public Output<ImmutableArray<string>> Members { get; private set; } = null!;
Expand Down Expand Up @@ -160,7 +166,7 @@ public partial class Group : Pulumi.CustomResource
public Output<string?> Theme { get; private set; } = null!;

/// <summary>
/// A set of group types to configure for the group. The only supported type is `Unified`, which specifies a Microsoft 365 group. Required when `mail_enabled` is true. Changing this forces a new resource to be created.
/// A set of group types to configure for the group. Supported values are `DynamicMembership`, which denotes a group with dynamic membership, and `Unified`, which specifies a Microsoft 365 group. Required when `mail_enabled` is true. Changing this forces a new resource to be created.
/// </summary>
[Output("types")]
public Output<ImmutableArray<string>> Types { get; private set; } = null!;
Expand Down Expand Up @@ -247,6 +253,12 @@ public InputList<string> Behaviors
[Input("displayName", required: true)]
public Input<string> DisplayName { get; set; } = null!;

/// <summary>
/// A `dynamic_membership` block as documented below. Required when `types` contains `DynamicMembership`. Cannot be used with the `members` property.
/// </summary>
[Input("dynamicMembership")]
public Input<Inputs.GroupDynamicMembershipArgs>? DynamicMembership { get; set; }

/// <summary>
/// Whether the group is a mail enabled, with a shared group mailbox. At least one of `mail_enabled` or `security_enabled` must be specified. Only Microsoft 365 groups can be mail enabled (see the `types` property).
/// </summary>
Expand All @@ -263,7 +275,7 @@ public InputList<string> Behaviors
private InputList<string>? _members;

/// <summary>
/// A set of members who should be present in this group. Supported object types are Users, Groups or Service Principals.
/// A set of members who should be present in this group. Supported object types are Users, Groups or Service Principals. Cannot be used with the `dynamic_membership` block.
/// </summary>
public InputList<string> Members
{
Expand Down Expand Up @@ -317,7 +329,7 @@ public InputList<string> ProvisioningOptions
private InputList<string>? _types;

/// <summary>
/// A set of group types to configure for the group. The only supported type is `Unified`, which specifies a Microsoft 365 group. Required when `mail_enabled` is true. Changing this forces a new resource to be created.
/// A set of group types to configure for the group. Supported values are `DynamicMembership`, which denotes a group with dynamic membership, and `Unified`, which specifies a Microsoft 365 group. Required when `mail_enabled` is true. Changing this forces a new resource to be created.
/// </summary>
public InputList<string> Types
{
Expand Down Expand Up @@ -368,6 +380,12 @@ public InputList<string> Behaviors
[Input("displayName")]
public Input<string>? DisplayName { get; set; }

/// <summary>
/// A `dynamic_membership` block as documented below. Required when `types` contains `DynamicMembership`. Cannot be used with the `members` property.
/// </summary>
[Input("dynamicMembership")]
public Input<Inputs.GroupDynamicMembershipGetArgs>? DynamicMembership { get; set; }

/// <summary>
/// The SMTP address for the group.
/// </summary>
Expand All @@ -390,7 +408,7 @@ public InputList<string> Behaviors
private InputList<string>? _members;

/// <summary>
/// A set of members who should be present in this group. Supported object types are Users, Groups or Service Principals.
/// A set of members who should be present in this group. Supported object types are Users, Groups or Service Principals. Cannot be used with the `dynamic_membership` block.
/// </summary>
public InputList<string> Members
{
Expand Down Expand Up @@ -498,7 +516,7 @@ public InputList<string> ProxyAddresses
private InputList<string>? _types;

/// <summary>
/// A set of group types to configure for the group. The only supported type is `Unified`, which specifies a Microsoft 365 group. Required when `mail_enabled` is true. Changing this forces a new resource to be created.
/// A set of group types to configure for the group. Supported values are `DynamicMembership`, which denotes a group with dynamic membership, and `Unified`, which specifies a Microsoft 365 group. Required when `mail_enabled` is true. Changing this forces a new resource to be created.
/// </summary>
public InputList<string> Types
{
Expand Down
31 changes: 31 additions & 0 deletions sdk/dotnet/Inputs/GroupDynamicMembershipArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureAD.Inputs
{

public sealed class GroupDynamicMembershipArgs : Pulumi.ResourceArgs
{
/// <summary>
/// Whether rule processing is "On" (true) or "Paused" (false).
/// </summary>
[Input("enabled", required: true)]
public Input<bool> Enabled { get; set; } = null!;

/// <summary>
/// The rule that determines membership of this group. For more information, see official documentation on [memmbership rules syntax](https://docs.microsoft.com/en-gb/azure/active-directory/enterprise-users/groups-dynamic-membership).
/// </summary>
[Input("rule", required: true)]
public Input<string> Rule { get; set; } = null!;

public GroupDynamicMembershipArgs()
{
}
}
}
31 changes: 31 additions & 0 deletions sdk/dotnet/Inputs/GroupDynamicMembershipGetArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureAD.Inputs
{

public sealed class GroupDynamicMembershipGetArgs : Pulumi.ResourceArgs
{
/// <summary>
/// Whether rule processing is "On" (true) or "Paused" (false).
/// </summary>
[Input("enabled", required: true)]
public Input<bool> Enabled { get; set; } = null!;

/// <summary>
/// The rule that determines membership of this group. For more information, see official documentation on [memmbership rules syntax](https://docs.microsoft.com/en-gb/azure/active-directory/enterprise-users/groups-dynamic-membership).
/// </summary>
[Input("rule", required: true)]
public Input<string> Rule { get; set; } = null!;

public GroupDynamicMembershipGetArgs()
{
}
}
}
35 changes: 35 additions & 0 deletions sdk/dotnet/Outputs/GetGroupDynamicMembershipResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureAD.Outputs
{

[OutputType]
public sealed class GetGroupDynamicMembershipResult
{
/// <summary>
/// Whether rule processing is "On" (true) or "Paused" (false).
/// </summary>
public readonly bool Enabled;
/// <summary>
/// The rule that determines membership of this group.
/// </summary>
public readonly string Rule;

[OutputConstructor]
private GetGroupDynamicMembershipResult(
bool enabled,

string rule)
{
Enabled = enabled;
Rule = rule;
}
}
}
35 changes: 35 additions & 0 deletions sdk/dotnet/Outputs/GroupDynamicMembership.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureAD.Outputs
{

[OutputType]
public sealed class GroupDynamicMembership
{
/// <summary>
/// Whether rule processing is "On" (true) or "Paused" (false).
/// </summary>
public readonly bool Enabled;
/// <summary>
/// The rule that determines membership of this group. For more information, see official documentation on [memmbership rules syntax](https://docs.microsoft.com/en-gb/azure/active-directory/enterprise-users/groups-dynamic-membership).
/// </summary>
public readonly string Rule;

[OutputConstructor]
private GroupDynamicMembership(
bool enabled,

string rule)
{
Enabled = enabled;
Rule = rule;
}
}
}
11 changes: 9 additions & 2 deletions sdk/go/azuread/getGroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ type LookupGroupResult struct {
Description string `pulumi:"description"`
// The display name for the group.
DisplayName string `pulumi:"displayName"`
// A `dynamicMembership` block as documented below.
DynamicMemberships []GetGroupDynamicMembership `pulumi:"dynamicMemberships"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The SMTP address for the group.
Expand Down Expand Up @@ -111,7 +113,7 @@ type LookupGroupResult struct {
SecurityEnabled bool `pulumi:"securityEnabled"`
// The colour theme for a Microsoft 365 group. Possible values are `Blue`, `Green`, `Orange`, `Pink`, `Purple`, `Red` or `Teal`. When no theme is set, the value is `null`.
Theme string `pulumi:"theme"`
// A list of group types configured for the group. The only supported type is `Unified`, which specifies a Microsoft 365 group.
// A list of group types configured for the group. Supported values are `DynamicMembership`, which denotes a group with dynamic membership, and `Unified`, which specifies a Microsoft 365 group.
Types []string `pulumi:"types"`
// The group join policy and group content visibility. Possible values are `Private`, `Public`, or `Hiddenmembership`. Only Microsoft 365 groups can have `Hiddenmembership` visibility.
Visibility string `pulumi:"visibility"`
Expand Down Expand Up @@ -177,6 +179,11 @@ func (o LookupGroupResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.DisplayName }).(pulumi.StringOutput)
}

// A `dynamicMembership` block as documented below.
func (o LookupGroupResultOutput) DynamicMemberships() GetGroupDynamicMembershipArrayOutput {
return o.ApplyT(func(v LookupGroupResult) []GetGroupDynamicMembership { return v.DynamicMemberships }).(GetGroupDynamicMembershipArrayOutput)
}

// The provider-assigned unique ID for this managed resource.
func (o LookupGroupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.Id }).(pulumi.StringOutput)
Expand Down Expand Up @@ -262,7 +269,7 @@ func (o LookupGroupResultOutput) Theme() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.Theme }).(pulumi.StringOutput)
}

// A list of group types configured for the group. The only supported type is `Unified`, which specifies a Microsoft 365 group.
// A list of group types configured for the group. Supported values are `DynamicMembership`, which denotes a group with dynamic membership, and `Unified`, which specifies a Microsoft 365 group.
func (o LookupGroupResultOutput) Types() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupGroupResult) []string { return v.Types }).(pulumi.StringArrayOutput)
}
Expand Down
Loading

0 comments on commit 605c429

Please sign in to comment.