Skip to content

Commit

Permalink
Merge pull request #240 from pulumi/guin/upgrade-v2.16.0
Browse files Browse the repository at this point in the history
Upgrade to terraform-provider-azuread v2.16.0
  • Loading branch information
guineveresaenger authored Jan 28, 2022
2 parents b4b6f67 + 6b45a39 commit e3c32d9
Show file tree
Hide file tree
Showing 12 changed files with 569 additions and 11 deletions.
70 changes: 69 additions & 1 deletion 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.20220114004106-da613363fc4a h1:ZRNcf+RNHFj2YmVshoKosI4SLUsP/z86oq4ypYZyH4Q=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220114004106-da613363fc4a/go.mod h1:xwU7MrDRLRoyJUJSSDhNms8yv3jHnlq4tJkuCfrHlVc=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220128030533-a33dcaa5e1f4 h1:PwkQSE13SSmQ9EFVjFbp+E0i+Wrphfb0Xlci0kvE57E=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220128030533-a33dcaa5e1f4/go.mod h1:9maKV4aH8NcQWpc4yaSKJBJ5xoHb0WlnBWVsriPx/sI=
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.39.0 h1:sOp4EAsYA4f0x/+fjPeWVEP3K9NULPjpqe6i9Itkgd8=
github.com/manicminer/hamilton v0.39.0/go.mod h1:IOYn2Dc9SUiZ7Ryw6c8Ay795vPPMnrCZe3MktS447dc=
github.com/manicminer/hamilton v0.40.1 h1:EcKl91ZHBA2NRwz2dyerPbkqH1PUR5GYJwqRUo1yCLg=
github.com/manicminer/hamilton v0.40.1/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.20220114004106-da613363fc4a
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220128030533-a33dcaa5e1f4
)

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.20220114004106-da613363fc4a h1:ZRNcf+RNHFj2YmVshoKosI4SLUsP/z86oq4ypYZyH4Q=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220114004106-da613363fc4a/go.mod h1:xwU7MrDRLRoyJUJSSDhNms8yv3jHnlq4tJkuCfrHlVc=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220128030533-a33dcaa5e1f4 h1:PwkQSE13SSmQ9EFVjFbp+E0i+Wrphfb0Xlci0kvE57E=
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220128030533-a33dcaa5e1f4/go.mod h1:9maKV4aH8NcQWpc4yaSKJBJ5xoHb0WlnBWVsriPx/sI=
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.39.0 h1:sOp4EAsYA4f0x/+fjPeWVEP3K9NULPjpqe6i9Itkgd8=
github.com/manicminer/hamilton v0.39.0/go.mod h1:IOYn2Dc9SUiZ7Ryw6c8Ay795vPPMnrCZe3MktS447dc=
github.com/manicminer/hamilton v0.40.1 h1:EcKl91ZHBA2NRwz2dyerPbkqH1PUR5GYJwqRUo1yCLg=
github.com/manicminer/hamilton v0.40.1/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
28 changes: 28 additions & 0 deletions sdk/dotnet/GetGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public sealed class GetGroupResult
/// </summary>
public readonly bool AssignableToRole;
/// <summary>
/// Indicates whether new members added to the group will be auto-subscribed to receive email notifications. Only set for Unified groups.
/// </summary>
public readonly bool AutoSubscribeNewMembers;
/// <summary>
/// A list of behaviors for a Microsoft 365 group, such as `AllowOnlyMembersToPost`, `HideGroupInOutlook`, `SubscribeNewGroupMembers` and `WelcomeEmailDisabled`. See [official documentation](https://docs.microsoft.com/en-us/graph/group-set-options) for more details.
/// </summary>
public readonly ImmutableArray<string> Behaviors;
Expand All @@ -179,6 +183,18 @@ public sealed class GetGroupResult
/// </summary>
public readonly ImmutableArray<Outputs.GetGroupDynamicMembershipResult> DynamicMemberships;
/// <summary>
/// Indicates whether people external to the organization can send messages to the group. Only set for Unified groups.
/// </summary>
public readonly bool ExternalSendersAllowed;
/// <summary>
/// Indicates whether the group is displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups. Only set for Unified groups.
/// </summary>
public readonly bool HideFromAddressLists;
/// <summary>
/// Indicates whether the group is displayed in Outlook clients, such as Outlook for Windows and Outlook on the web. Only set for Unified groups.
/// </summary>
public readonly bool HideFromOutlookClients;
/// <summary>
/// The provider-assigned unique ID for this managed resource.
/// </summary>
public readonly string Id;
Expand Down Expand Up @@ -259,6 +275,8 @@ public sealed class GetGroupResult
private GetGroupResult(
bool assignableToRole,

bool autoSubscribeNewMembers,

ImmutableArray<string> behaviors,

string description,
Expand All @@ -267,6 +285,12 @@ private GetGroupResult(

ImmutableArray<Outputs.GetGroupDynamicMembershipResult> dynamicMemberships,

bool externalSendersAllowed,

bool hideFromAddressLists,

bool hideFromOutlookClients,

string id,

string mail,
Expand Down Expand Up @@ -306,10 +330,14 @@ private GetGroupResult(
string visibility)
{
AssignableToRole = assignableToRole;
AutoSubscribeNewMembers = autoSubscribeNewMembers;
Behaviors = behaviors;
Description = description;
DisplayName = displayName;
DynamicMemberships = dynamicMemberships;
ExternalSendersAllowed = externalSendersAllowed;
HideFromAddressLists = hideFromAddressLists;
HideFromOutlookClients = hideFromOutlookClients;
Id = id;
Mail = mail;
MailEnabled = mailEnabled;
Expand Down
74 changes: 74 additions & 0 deletions sdk/dotnet/Group.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ namespace Pulumi.AzureAD
///
/// When authenticated with a user principal, this resource requires one of the following directory roles: `Groups Administrator`, `User Administrator` or `Global Administrator`
///
/// The `external_senders_allowed`, `auto_subscribe_new_members`, `hide_from_address_lists` and `hide_from_outlook_clients` properties can only be configured when authenticating as a user and cannot be configured when authenticating as a service principal. Additionally, the user being used for authentication must be a Member of the tenant where the group is being managed and _not_ a Guest. This is a known API issue; please see the [Microsoft Graph Known Issues](https://docs.microsoft.com/en-us/graph/known-issues#groups) official documentation.
///
/// ## Import
///
/// Groups can be imported using their object ID, e.g.
Expand All @@ -41,6 +43,12 @@ public partial class Group : Pulumi.CustomResource
[Output("assignableToRole")]
public Output<bool?> AssignableToRole { get; private set; } = null!;

/// <summary>
/// Indicates whether new members added to the group will be auto-subscribed to receive email notifications. Can only be set for Unified groups.
/// </summary>
[Output("autoSubscribeNewMembers")]
public Output<bool?> AutoSubscribeNewMembers { get; private set; } = null!;

/// <summary>
/// A set of behaviors for a Microsoft 365 group. Possible values are `AllowOnlyMembersToPost`, `HideGroupInOutlook`, `SubscribeNewGroupMembers` and `WelcomeEmailDisabled`. See [official documentation](https://docs.microsoft.com/en-us/graph/group-set-options) for more details. Changing this forces a new resource to be created.
/// </summary>
Expand All @@ -65,6 +73,24 @@ public partial class Group : Pulumi.CustomResource
[Output("dynamicMembership")]
public Output<Outputs.GroupDynamicMembership?> DynamicMembership { get; private set; } = null!;

/// <summary>
/// Indicates whether people external to the organization can send messages to the group. Can only be set for Unified groups.
/// </summary>
[Output("externalSendersAllowed")]
public Output<bool?> ExternalSendersAllowed { get; private set; } = null!;

/// <summary>
/// Indicates whether the group is displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups. Can only be set for Unified groups.
/// </summary>
[Output("hideFromAddressLists")]
public Output<bool?> HideFromAddressLists { get; private set; } = null!;

/// <summary>
/// Indicates whether the group is displayed in Outlook clients, such as Outlook for Windows and Outlook on the web. Can only be set for Unified groups.
/// </summary>
[Output("hideFromOutlookClients")]
public Output<bool?> HideFromOutlookClients { get; private set; } = null!;

/// <summary>
/// The SMTP address for the group.
/// </summary>
Expand Down Expand Up @@ -231,6 +257,12 @@ public sealed class GroupArgs : Pulumi.ResourceArgs
[Input("assignableToRole")]
public Input<bool>? AssignableToRole { get; set; }

/// <summary>
/// Indicates whether new members added to the group will be auto-subscribed to receive email notifications. Can only be set for Unified groups.
/// </summary>
[Input("autoSubscribeNewMembers")]
public Input<bool>? AutoSubscribeNewMembers { get; set; }

[Input("behaviors")]
private InputList<string>? _behaviors;

Expand Down Expand Up @@ -261,6 +293,24 @@ public InputList<string> Behaviors
[Input("dynamicMembership")]
public Input<Inputs.GroupDynamicMembershipArgs>? DynamicMembership { get; set; }

/// <summary>
/// Indicates whether people external to the organization can send messages to the group. Can only be set for Unified groups.
/// </summary>
[Input("externalSendersAllowed")]
public Input<bool>? ExternalSendersAllowed { get; set; }

/// <summary>
/// Indicates whether the group is displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups. Can only be set for Unified groups.
/// </summary>
[Input("hideFromAddressLists")]
public Input<bool>? HideFromAddressLists { get; set; }

/// <summary>
/// Indicates whether the group is displayed in Outlook clients, such as Outlook for Windows and Outlook on the web. Can only be set for Unified groups.
/// </summary>
[Input("hideFromOutlookClients")]
public Input<bool>? HideFromOutlookClients { 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 Down Expand Up @@ -358,6 +408,12 @@ public sealed class GroupState : Pulumi.ResourceArgs
[Input("assignableToRole")]
public Input<bool>? AssignableToRole { get; set; }

/// <summary>
/// Indicates whether new members added to the group will be auto-subscribed to receive email notifications. Can only be set for Unified groups.
/// </summary>
[Input("autoSubscribeNewMembers")]
public Input<bool>? AutoSubscribeNewMembers { get; set; }

[Input("behaviors")]
private InputList<string>? _behaviors;

Expand Down Expand Up @@ -388,6 +444,24 @@ public InputList<string> Behaviors
[Input("dynamicMembership")]
public Input<Inputs.GroupDynamicMembershipGetArgs>? DynamicMembership { get; set; }

/// <summary>
/// Indicates whether people external to the organization can send messages to the group. Can only be set for Unified groups.
/// </summary>
[Input("externalSendersAllowed")]
public Input<bool>? ExternalSendersAllowed { get; set; }

/// <summary>
/// Indicates whether the group is displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups. Can only be set for Unified groups.
/// </summary>
[Input("hideFromAddressLists")]
public Input<bool>? HideFromAddressLists { get; set; }

/// <summary>
/// Indicates whether the group is displayed in Outlook clients, such as Outlook for Windows and Outlook on the web. Can only be set for Unified groups.
/// </summary>
[Input("hideFromOutlookClients")]
public Input<bool>? HideFromOutlookClients { get; set; }

/// <summary>
/// The SMTP address for the group.
/// </summary>
Expand Down
28 changes: 28 additions & 0 deletions sdk/go/azuread/getGroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ type LookupGroupArgs struct {
type LookupGroupResult struct {
// Indicates whether this group can be assigned to an Azure Active Directory role.
AssignableToRole bool `pulumi:"assignableToRole"`
// Indicates whether new members added to the group will be auto-subscribed to receive email notifications. Only set for Unified groups.
AutoSubscribeNewMembers bool `pulumi:"autoSubscribeNewMembers"`
// A list of behaviors for a Microsoft 365 group, such as `AllowOnlyMembersToPost`, `HideGroupInOutlook`, `SubscribeNewGroupMembers` and `WelcomeEmailDisabled`. See [official documentation](https://docs.microsoft.com/en-us/graph/group-set-options) for more details.
Behaviors []string `pulumi:"behaviors"`
// The optional description of the group.
Expand All @@ -79,6 +81,12 @@ type LookupGroupResult struct {
DisplayName string `pulumi:"displayName"`
// A `dynamicMembership` block as documented below.
DynamicMemberships []GetGroupDynamicMembership `pulumi:"dynamicMemberships"`
// Indicates whether people external to the organization can send messages to the group. Only set for Unified groups.
ExternalSendersAllowed bool `pulumi:"externalSendersAllowed"`
// Indicates whether the group is displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups. Only set for Unified groups.
HideFromAddressLists bool `pulumi:"hideFromAddressLists"`
// Indicates whether the group is displayed in Outlook clients, such as Outlook for Windows and Outlook on the web. Only set for Unified groups.
HideFromOutlookClients bool `pulumi:"hideFromOutlookClients"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The SMTP address for the group.
Expand Down Expand Up @@ -164,6 +172,11 @@ func (o LookupGroupResultOutput) AssignableToRole() pulumi.BoolOutput {
return o.ApplyT(func(v LookupGroupResult) bool { return v.AssignableToRole }).(pulumi.BoolOutput)
}

// Indicates whether new members added to the group will be auto-subscribed to receive email notifications. Only set for Unified groups.
func (o LookupGroupResultOutput) AutoSubscribeNewMembers() pulumi.BoolOutput {
return o.ApplyT(func(v LookupGroupResult) bool { return v.AutoSubscribeNewMembers }).(pulumi.BoolOutput)
}

// A list of behaviors for a Microsoft 365 group, such as `AllowOnlyMembersToPost`, `HideGroupInOutlook`, `SubscribeNewGroupMembers` and `WelcomeEmailDisabled`. See [official documentation](https://docs.microsoft.com/en-us/graph/group-set-options) for more details.
func (o LookupGroupResultOutput) Behaviors() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupGroupResult) []string { return v.Behaviors }).(pulumi.StringArrayOutput)
Expand All @@ -184,6 +197,21 @@ func (o LookupGroupResultOutput) DynamicMemberships() GetGroupDynamicMembershipA
return o.ApplyT(func(v LookupGroupResult) []GetGroupDynamicMembership { return v.DynamicMemberships }).(GetGroupDynamicMembershipArrayOutput)
}

// Indicates whether people external to the organization can send messages to the group. Only set for Unified groups.
func (o LookupGroupResultOutput) ExternalSendersAllowed() pulumi.BoolOutput {
return o.ApplyT(func(v LookupGroupResult) bool { return v.ExternalSendersAllowed }).(pulumi.BoolOutput)
}

// Indicates whether the group is displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups. Only set for Unified groups.
func (o LookupGroupResultOutput) HideFromAddressLists() pulumi.BoolOutput {
return o.ApplyT(func(v LookupGroupResult) bool { return v.HideFromAddressLists }).(pulumi.BoolOutput)
}

// Indicates whether the group is displayed in Outlook clients, such as Outlook for Windows and Outlook on the web. Only set for Unified groups.
func (o LookupGroupResultOutput) HideFromOutlookClients() pulumi.BoolOutput {
return o.ApplyT(func(v LookupGroupResult) bool { return v.HideFromOutlookClients }).(pulumi.BoolOutput)
}

// 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
Loading

0 comments on commit e3c32d9

Please sign in to comment.