Skip to content

Commit

Permalink
Upgrade terraform-provider-azuread to v2.2.0 (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkodroff authored Apr 11, 2022
1 parent a4a9265 commit cd2a936
Show file tree
Hide file tree
Showing 17 changed files with 1,899 additions and 248 deletions.
99 changes: 99 additions & 0 deletions provider/cmd/pulumi-resource-azuread/schema.json

Large diffs are not rendered by default.

141 changes: 79 additions & 62 deletions provider/go.sum

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ func Provider() tfbridge.ProviderInfo {
Tok: makeResource(mainMod, "ApplicationFederatedIdentityCredential"),
},
"azuread_custom_directory_role": {Tok: makeResource(mainMod, "CustomDirectoryRole")},
"azuread_claims_mapping_policy": {Tok: makeResource(mainMod, "ClaimsMappingPolicy")},
"azuread_service_principal_claims_mapping_policy_assignment": {
Tok: makeResource(mainMod, "ServicePrincipalClaimsMappingPolicyAssignment"),
},
},
DataSources: map[string]*tfbridge.DataSourceInfo{
"azuread_application": {Tok: makeDataSource(mainMod, "getApplication")},
Expand Down
4 changes: 2 additions & 2 deletions provider/shim/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/hashicorp/terraform-provider-azuread/shim
go 1.15

require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220311140254-fef2a3399fc1
github.com/hashicorp/terraform-plugin-sdk/v2 v2.13.0
github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20220408013451-c302cae286e5
)

replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20211230170131-3a7c83bfab87
261 changes: 77 additions & 184 deletions provider/shim/go.sum

Large diffs are not rendered by default.

139 changes: 139 additions & 0 deletions sdk/dotnet/ClaimsMappingPolicy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
// *** 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
{
/// <summary>
/// Manages a Claims Mapping Policy within Azure Active Directory.
///
/// ## API Permissions
///
/// The following API permissions are required in order to use this resource.
///
/// When authenticated with a service principal, this resource requires the following application roles: `Policy.ReadWrite.ApplicationConfiguration`
///
/// When authenticated with a user principal, this resource requires one of the following directory roles: `Application Administrator` or `Global Administrator`
///
/// ## Import
///
/// Claims Mapping Policy can be imported using the `id`, e.g.
///
/// ```sh
/// $ pulumi import azuread:index/claimsMappingPolicy:ClaimsMappingPolicy my_policy 00000000-0000-0000-0000-000000000000
/// ```
/// </summary>
[AzureADResourceType("azuread:index/claimsMappingPolicy:ClaimsMappingPolicy")]
public partial class ClaimsMappingPolicy : Pulumi.CustomResource
{
/// <summary>
/// A string collection containing a JSON string that defines the rules and settings for this policy
/// </summary>
[Output("definitions")]
public Output<ImmutableArray<string>> Definitions { get; private set; } = null!;

/// <summary>
/// The display name for this Claims Mapping Policy.
/// </summary>
[Output("displayName")]
public Output<string> DisplayName { get; private set; } = null!;


/// <summary>
/// Create a ClaimsMappingPolicy resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public ClaimsMappingPolicy(string name, ClaimsMappingPolicyArgs args, CustomResourceOptions? options = null)
: base("azuread:index/claimsMappingPolicy:ClaimsMappingPolicy", name, args ?? new ClaimsMappingPolicyArgs(), MakeResourceOptions(options, ""))
{
}

private ClaimsMappingPolicy(string name, Input<string> id, ClaimsMappingPolicyState? state = null, CustomResourceOptions? options = null)
: base("azuread:index/claimsMappingPolicy:ClaimsMappingPolicy", name, state, MakeResourceOptions(options, id))
{
}

private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
/// <summary>
/// Get an existing ClaimsMappingPolicy resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="state">Any extra arguments used during the lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static ClaimsMappingPolicy Get(string name, Input<string> id, ClaimsMappingPolicyState? state = null, CustomResourceOptions? options = null)
{
return new ClaimsMappingPolicy(name, id, state, options);
}
}

public sealed class ClaimsMappingPolicyArgs : Pulumi.ResourceArgs
{
[Input("definitions", required: true)]
private InputList<string>? _definitions;

/// <summary>
/// A string collection containing a JSON string that defines the rules and settings for this policy
/// </summary>
public InputList<string> Definitions
{
get => _definitions ?? (_definitions = new InputList<string>());
set => _definitions = value;
}

/// <summary>
/// The display name for this Claims Mapping Policy.
/// </summary>
[Input("displayName", required: true)]
public Input<string> DisplayName { get; set; } = null!;

public ClaimsMappingPolicyArgs()
{
}
}

public sealed class ClaimsMappingPolicyState : Pulumi.ResourceArgs
{
[Input("definitions")]
private InputList<string>? _definitions;

/// <summary>
/// A string collection containing a JSON string that defines the rules and settings for this policy
/// </summary>
public InputList<string> Definitions
{
get => _definitions ?? (_definitions = new InputList<string>());
set => _definitions = value;
}

/// <summary>
/// The display name for this Claims Mapping Policy.
/// </summary>
[Input("displayName")]
public Input<string>? DisplayName { get; set; }

public ClaimsMappingPolicyState()
{
}
}
}
155 changes: 155 additions & 0 deletions sdk/dotnet/ServicePrincipalClaimsMappingPolicyAssignment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
// *** 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
{
/// <summary>
/// ##
///
/// ***
/// subcategory: "Service Principals"
/// ---
///
/// # Resource: azuread.ServicePrincipalClaimsMappingPolicyAssignment
///
/// Manages a Claims Mapping Policy Assignment within Azure Active Directory.
///
/// ## API Permissions
///
/// The following API permissions are required in order to use this resource.
///
/// When authenticated with a service principal, this resource requires the following application roles: `Policy.ReadWrite.ApplicationConfiguration`
///
/// When authenticated with a user principal, this resource requires one of the following directory roles: `Application Administrator` or `Global Administrator`
///
/// ## Example Usage
///
/// ```csharp
/// using Pulumi;
/// using AzureAD = Pulumi.AzureAD;
///
/// class MyStack : Stack
/// {
/// public MyStack()
/// {
/// var app = new AzureAD.ServicePrincipalClaimsMappingPolicyAssignment("app", new AzureAD.ServicePrincipalClaimsMappingPolicyAssignmentArgs
/// {
/// ClaimsMappingPolicyId = azuread_claims_mapping_policy.My_policy.Id,
/// ServicePrincipalId = azuread_service_principal.My_principal.Id,
/// });
/// }
///
/// }
/// ```
///
/// ## Import
///
/// Claims Mapping Policy can be imported using the `id`, in the form `service-principal-uuid/claimsMappingPolicy/claims-mapping-policy-uuid`, e.g
///
/// ```sh
/// $ pulumi import azuread:index/servicePrincipalClaimsMappingPolicyAssignment:ServicePrincipalClaimsMappingPolicyAssignment app 00000000-0000-0000-0000-000000000000/claimsMappingPolicy/11111111-0000-0000-0000-000000000000
/// ```
/// </summary>
[AzureADResourceType("azuread:index/servicePrincipalClaimsMappingPolicyAssignment:ServicePrincipalClaimsMappingPolicyAssignment")]
public partial class ServicePrincipalClaimsMappingPolicyAssignment : Pulumi.CustomResource
{
/// <summary>
/// The ID of the claims mapping policy to assign.
/// </summary>
[Output("claimsMappingPolicyId")]
public Output<string> ClaimsMappingPolicyId { get; private set; } = null!;

/// <summary>
/// The object ID of the service principal for the policy assignment.
/// </summary>
[Output("servicePrincipalId")]
public Output<string> ServicePrincipalId { get; private set; } = null!;


/// <summary>
/// Create a ServicePrincipalClaimsMappingPolicyAssignment resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public ServicePrincipalClaimsMappingPolicyAssignment(string name, ServicePrincipalClaimsMappingPolicyAssignmentArgs args, CustomResourceOptions? options = null)
: base("azuread:index/servicePrincipalClaimsMappingPolicyAssignment:ServicePrincipalClaimsMappingPolicyAssignment", name, args ?? new ServicePrincipalClaimsMappingPolicyAssignmentArgs(), MakeResourceOptions(options, ""))
{
}

private ServicePrincipalClaimsMappingPolicyAssignment(string name, Input<string> id, ServicePrincipalClaimsMappingPolicyAssignmentState? state = null, CustomResourceOptions? options = null)
: base("azuread:index/servicePrincipalClaimsMappingPolicyAssignment:ServicePrincipalClaimsMappingPolicyAssignment", name, state, MakeResourceOptions(options, id))
{
}

private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
/// <summary>
/// Get an existing ServicePrincipalClaimsMappingPolicyAssignment resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="state">Any extra arguments used during the lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static ServicePrincipalClaimsMappingPolicyAssignment Get(string name, Input<string> id, ServicePrincipalClaimsMappingPolicyAssignmentState? state = null, CustomResourceOptions? options = null)
{
return new ServicePrincipalClaimsMappingPolicyAssignment(name, id, state, options);
}
}

public sealed class ServicePrincipalClaimsMappingPolicyAssignmentArgs : Pulumi.ResourceArgs
{
/// <summary>
/// The ID of the claims mapping policy to assign.
/// </summary>
[Input("claimsMappingPolicyId", required: true)]
public Input<string> ClaimsMappingPolicyId { get; set; } = null!;

/// <summary>
/// The object ID of the service principal for the policy assignment.
/// </summary>
[Input("servicePrincipalId", required: true)]
public Input<string> ServicePrincipalId { get; set; } = null!;

public ServicePrincipalClaimsMappingPolicyAssignmentArgs()
{
}
}

public sealed class ServicePrincipalClaimsMappingPolicyAssignmentState : Pulumi.ResourceArgs
{
/// <summary>
/// The ID of the claims mapping policy to assign.
/// </summary>
[Input("claimsMappingPolicyId")]
public Input<string>? ClaimsMappingPolicyId { get; set; }

/// <summary>
/// The object ID of the service principal for the policy assignment.
/// </summary>
[Input("servicePrincipalId")]
public Input<string>? ServicePrincipalId { get; set; }

public ServicePrincipalClaimsMappingPolicyAssignmentState()
{
}
}
}
Loading

0 comments on commit cd2a936

Please sign in to comment.