azuread.AccessPackageResourcePackageAssociation
Explore with Pulumi AI
Manages the resources added to access packages within Identity Governance in 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 role: EntitlementManagement.ReadWrite.All
.
When authenticated with a user principal, this resource requires one of the following directory roles: Catalog owner
, Access package manager
or Global Administrator
.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = new azuread.Group("example", {
displayName: "example-group",
securityEnabled: true,
});
const exampleAccessPackageCatalog = new azuread.AccessPackageCatalog("example", {
displayName: "example-catalog",
description: "Example catalog",
});
const exampleAccessPackageResourceCatalogAssociation = new azuread.AccessPackageResourceCatalogAssociation("example", {
catalogId: exampleCatalog.id,
resourceOriginId: exampleGroup.objectId,
resourceOriginSystem: "AadGroup",
});
const exampleAccessPackage = new azuread.AccessPackage("example", {
displayName: "example-package",
description: "Example Package",
catalogId: exampleCatalog.id,
});
const exampleAccessPackageResourcePackageAssociation = new azuread.AccessPackageResourcePackageAssociation("example", {
accessPackageId: exampleAccessPackage.id,
catalogResourceAssociationId: exampleAccessPackageResourceCatalogAssociation.id,
});
import pulumi
import pulumi_azuread as azuread
example = azuread.Group("example",
display_name="example-group",
security_enabled=True)
example_access_package_catalog = azuread.AccessPackageCatalog("example",
display_name="example-catalog",
description="Example catalog")
example_access_package_resource_catalog_association = azuread.AccessPackageResourceCatalogAssociation("example",
catalog_id=example_catalog["id"],
resource_origin_id=example_group["objectId"],
resource_origin_system="AadGroup")
example_access_package = azuread.AccessPackage("example",
display_name="example-package",
description="Example Package",
catalog_id=example_catalog["id"])
example_access_package_resource_package_association = azuread.AccessPackageResourcePackageAssociation("example",
access_package_id=example_access_package.id,
catalog_resource_association_id=example_access_package_resource_catalog_association.id)
package main
import (
"github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azuread.NewGroup(ctx, "example", &azuread.GroupArgs{
DisplayName: pulumi.String("example-group"),
SecurityEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = azuread.NewAccessPackageCatalog(ctx, "example", &azuread.AccessPackageCatalogArgs{
DisplayName: pulumi.String("example-catalog"),
Description: pulumi.String("Example catalog"),
})
if err != nil {
return err
}
exampleAccessPackageResourceCatalogAssociation, err := azuread.NewAccessPackageResourceCatalogAssociation(ctx, "example", &azuread.AccessPackageResourceCatalogAssociationArgs{
CatalogId: pulumi.Any(exampleCatalog.Id),
ResourceOriginId: pulumi.Any(exampleGroup.ObjectId),
ResourceOriginSystem: pulumi.String("AadGroup"),
})
if err != nil {
return err
}
exampleAccessPackage, err := azuread.NewAccessPackage(ctx, "example", &azuread.AccessPackageArgs{
DisplayName: pulumi.String("example-package"),
Description: pulumi.String("Example Package"),
CatalogId: pulumi.Any(exampleCatalog.Id),
})
if err != nil {
return err
}
_, err = azuread.NewAccessPackageResourcePackageAssociation(ctx, "example", &azuread.AccessPackageResourcePackageAssociationArgs{
AccessPackageId: exampleAccessPackage.ID(),
CatalogResourceAssociationId: exampleAccessPackageResourceCatalogAssociation.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureAD = Pulumi.AzureAD;
return await Deployment.RunAsync(() =>
{
var example = new AzureAD.Group("example", new()
{
DisplayName = "example-group",
SecurityEnabled = true,
});
var exampleAccessPackageCatalog = new AzureAD.AccessPackageCatalog("example", new()
{
DisplayName = "example-catalog",
Description = "Example catalog",
});
var exampleAccessPackageResourceCatalogAssociation = new AzureAD.AccessPackageResourceCatalogAssociation("example", new()
{
CatalogId = exampleCatalog.Id,
ResourceOriginId = exampleGroup.ObjectId,
ResourceOriginSystem = "AadGroup",
});
var exampleAccessPackage = new AzureAD.AccessPackage("example", new()
{
DisplayName = "example-package",
Description = "Example Package",
CatalogId = exampleCatalog.Id,
});
var exampleAccessPackageResourcePackageAssociation = new AzureAD.AccessPackageResourcePackageAssociation("example", new()
{
AccessPackageId = exampleAccessPackage.Id,
CatalogResourceAssociationId = exampleAccessPackageResourceCatalogAssociation.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.Group;
import com.pulumi.azuread.GroupArgs;
import com.pulumi.azuread.AccessPackageCatalog;
import com.pulumi.azuread.AccessPackageCatalogArgs;
import com.pulumi.azuread.AccessPackageResourceCatalogAssociation;
import com.pulumi.azuread.AccessPackageResourceCatalogAssociationArgs;
import com.pulumi.azuread.AccessPackage;
import com.pulumi.azuread.AccessPackageArgs;
import com.pulumi.azuread.AccessPackageResourcePackageAssociation;
import com.pulumi.azuread.AccessPackageResourcePackageAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Group("example", GroupArgs.builder()
.displayName("example-group")
.securityEnabled(true)
.build());
var exampleAccessPackageCatalog = new AccessPackageCatalog("exampleAccessPackageCatalog", AccessPackageCatalogArgs.builder()
.displayName("example-catalog")
.description("Example catalog")
.build());
var exampleAccessPackageResourceCatalogAssociation = new AccessPackageResourceCatalogAssociation("exampleAccessPackageResourceCatalogAssociation", AccessPackageResourceCatalogAssociationArgs.builder()
.catalogId(exampleCatalog.id())
.resourceOriginId(exampleGroup.objectId())
.resourceOriginSystem("AadGroup")
.build());
var exampleAccessPackage = new AccessPackage("exampleAccessPackage", AccessPackageArgs.builder()
.displayName("example-package")
.description("Example Package")
.catalogId(exampleCatalog.id())
.build());
var exampleAccessPackageResourcePackageAssociation = new AccessPackageResourcePackageAssociation("exampleAccessPackageResourcePackageAssociation", AccessPackageResourcePackageAssociationArgs.builder()
.accessPackageId(exampleAccessPackage.id())
.catalogResourceAssociationId(exampleAccessPackageResourceCatalogAssociation.id())
.build());
}
}
resources:
example:
type: azuread:Group
properties:
displayName: example-group
securityEnabled: true
exampleAccessPackageCatalog:
type: azuread:AccessPackageCatalog
name: example
properties:
displayName: example-catalog
description: Example catalog
exampleAccessPackageResourceCatalogAssociation:
type: azuread:AccessPackageResourceCatalogAssociation
name: example
properties:
catalogId: ${exampleCatalog.id}
resourceOriginId: ${exampleGroup.objectId}
resourceOriginSystem: AadGroup
exampleAccessPackage:
type: azuread:AccessPackage
name: example
properties:
displayName: example-package
description: Example Package
catalogId: ${exampleCatalog.id}
exampleAccessPackageResourcePackageAssociation:
type: azuread:AccessPackageResourcePackageAssociation
name: example
properties:
accessPackageId: ${exampleAccessPackage.id}
catalogResourceAssociationId: ${exampleAccessPackageResourceCatalogAssociation.id}
Create AccessPackageResourcePackageAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccessPackageResourcePackageAssociation(name: string, args: AccessPackageResourcePackageAssociationArgs, opts?: CustomResourceOptions);
@overload
def AccessPackageResourcePackageAssociation(resource_name: str,
args: AccessPackageResourcePackageAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccessPackageResourcePackageAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_package_id: Optional[str] = None,
catalog_resource_association_id: Optional[str] = None,
access_type: Optional[str] = None)
func NewAccessPackageResourcePackageAssociation(ctx *Context, name string, args AccessPackageResourcePackageAssociationArgs, opts ...ResourceOption) (*AccessPackageResourcePackageAssociation, error)
public AccessPackageResourcePackageAssociation(string name, AccessPackageResourcePackageAssociationArgs args, CustomResourceOptions? opts = null)
public AccessPackageResourcePackageAssociation(String name, AccessPackageResourcePackageAssociationArgs args)
public AccessPackageResourcePackageAssociation(String name, AccessPackageResourcePackageAssociationArgs args, CustomResourceOptions options)
type: azuread:AccessPackageResourcePackageAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccessPackageResourcePackageAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccessPackageResourcePackageAssociationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccessPackageResourcePackageAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessPackageResourcePackageAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccessPackageResourcePackageAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var accessPackageResourcePackageAssociationResource = new AzureAD.AccessPackageResourcePackageAssociation("accessPackageResourcePackageAssociationResource", new()
{
AccessPackageId = "string",
CatalogResourceAssociationId = "string",
AccessType = "string",
});
example, err := azuread.NewAccessPackageResourcePackageAssociation(ctx, "accessPackageResourcePackageAssociationResource", &azuread.AccessPackageResourcePackageAssociationArgs{
AccessPackageId: pulumi.String("string"),
CatalogResourceAssociationId: pulumi.String("string"),
AccessType: pulumi.String("string"),
})
var accessPackageResourcePackageAssociationResource = new AccessPackageResourcePackageAssociation("accessPackageResourcePackageAssociationResource", AccessPackageResourcePackageAssociationArgs.builder()
.accessPackageId("string")
.catalogResourceAssociationId("string")
.accessType("string")
.build());
access_package_resource_package_association_resource = azuread.AccessPackageResourcePackageAssociation("accessPackageResourcePackageAssociationResource",
access_package_id="string",
catalog_resource_association_id="string",
access_type="string")
const accessPackageResourcePackageAssociationResource = new azuread.AccessPackageResourcePackageAssociation("accessPackageResourcePackageAssociationResource", {
accessPackageId: "string",
catalogResourceAssociationId: "string",
accessType: "string",
});
type: azuread:AccessPackageResourcePackageAssociation
properties:
accessPackageId: string
accessType: string
catalogResourceAssociationId: string
AccessPackageResourcePackageAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AccessPackageResourcePackageAssociation resource accepts the following input properties:
- Access
Package stringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- Catalog
Resource stringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created. - Access
Type string - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created.
- Access
Package stringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- Catalog
Resource stringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created. - Access
Type string - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created.
- access
Package StringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- catalog
Resource StringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created. - access
Type String - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created.
- access
Package stringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- catalog
Resource stringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created. - access
Type string - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created.
- access_
package_ strid - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- catalog_
resource_ strassociation_ id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created. - access_
type str - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created.
- access
Package StringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- catalog
Resource StringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created. - access
Type String - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessPackageResourcePackageAssociation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AccessPackageResourcePackageAssociation Resource
Get an existing AccessPackageResourcePackageAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccessPackageResourcePackageAssociationState, opts?: CustomResourceOptions): AccessPackageResourcePackageAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_package_id: Optional[str] = None,
access_type: Optional[str] = None,
catalog_resource_association_id: Optional[str] = None) -> AccessPackageResourcePackageAssociation
func GetAccessPackageResourcePackageAssociation(ctx *Context, name string, id IDInput, state *AccessPackageResourcePackageAssociationState, opts ...ResourceOption) (*AccessPackageResourcePackageAssociation, error)
public static AccessPackageResourcePackageAssociation Get(string name, Input<string> id, AccessPackageResourcePackageAssociationState? state, CustomResourceOptions? opts = null)
public static AccessPackageResourcePackageAssociation get(String name, Output<String> id, AccessPackageResourcePackageAssociationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Package stringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- Access
Type string - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created. - Catalog
Resource stringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created.
- Access
Package stringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- Access
Type string - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created. - Catalog
Resource stringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created.
- access
Package StringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- access
Type String - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created. - catalog
Resource StringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created.
- access
Package stringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- access
Type string - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created. - catalog
Resource stringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created.
- access_
package_ strid - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- access_
type str - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created. - catalog_
resource_ strassociation_ id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created.
- access
Package StringId - The ID of access package this resource association is configured to. Changing this forces a new resource to be created.
- access
Type String - The role of access type to the specified resource. Valid values are
Member
, orOwner
The default isMember
. Changing this forces a new resource to be created. - catalog
Resource StringAssociation Id - The ID of the catalog association from the
azuread.AccessPackageResourceCatalogAssociation
resource. Changing this forces a new resource to be created.
Import
The resource and catalog association can be imported using the access package ID, the access package ResourceRoleScope, the resource origin ID, and the access type, e.g.
$ pulumi import azuread:index/accessPackageResourcePackageAssociation:AccessPackageResourcePackageAssociation example 00000000-0000-0000-0000-000000000000/11111111-1111-1111-1111-111111111111_22222222-2222-2222-2222-22222222/33333333-3333-3333-3333-33333333/Member
-> This ID format is unique to Terraform and is composed of the Access Package ID, the access package ResourceRoleScope (in the format Role_Scope), the Resource Origin ID, and the Access Type, in the format {AccessPackageID}/{ResourceRoleScope}/{ResourceOriginID}/{AccessType}
.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Active Directory (Azure AD) pulumi/pulumi-azuread
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuread
Terraform Provider.