AccessPolicy
Manages a Key Vault Access Policy.
NOTE: It’s possible to define Key Vault Access Policies both within the
azure.keyvault.KeyVaultresource via theaccess_policyblock and by using theazure.keyvault.AccessPolicyresource. However it’s not possible to use both methods to manage Access Policies within a KeyVault, since there’ll be conflicts.NOTE: Azure permits a maximum of 1024 Access Policies per Key Vault - more information can be found in this document.
Create a AccessPolicy Resource
new AccessPolicy(name: string, args: AccessPolicyArgs, opts?: CustomResourceOptions);def AccessPolicy(resource_name, opts=None, application_id=None, certificate_permissions=None, key_permissions=None, key_vault_id=None, object_id=None, secret_permissions=None, storage_permissions=None, tenant_id=None, __props__=None);func NewAccessPolicy(ctx *Context, name string, args AccessPolicyArgs, opts ...ResourceOption) (*AccessPolicy, error)public AccessPolicy(string name, AccessPolicyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args AccessPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccessPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
AccessPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The AccessPolicy resource accepts the following input properties:
- Key
Vault stringId Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
- Object
Id string The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
- Tenant
Id string The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
- Application
Id string The object ID of an Application in Azure Active Directory.
- Certificate
Permissions List<string> List of certificate permissions, must be one or more from the following:
backup,create,delete,deleteissuers,get,getissuers,import,list,listissuers,managecontacts,manageissuers,purge,recover,restore,setissuersandupdate.- Key
Permissions List<string> List of key permissions, must be one or more from the following:
backup,create,decrypt,delete,encrypt,get,import,list,purge,recover,restore,sign,unwrapKey,update,verifyandwrapKey.- Secret
Permissions List<string> List of secret permissions, must be one or more from the following:
backup,delete,get,list,purge,recover,restoreandset.- Storage
Permissions List<string> List of storage permissions, must be one or more from the following:
backup,delete,deletesas,get,getsas,list,listsas,purge,recover,regeneratekey,restore,set,setsasandupdate.
- Key
Vault stringId Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
- Object
Id string The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
- Tenant
Id string The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
- Application
Id string The object ID of an Application in Azure Active Directory.
- Certificate
Permissions []string List of certificate permissions, must be one or more from the following:
backup,create,delete,deleteissuers,get,getissuers,import,list,listissuers,managecontacts,manageissuers,purge,recover,restore,setissuersandupdate.- Key
Permissions []string List of key permissions, must be one or more from the following:
backup,create,decrypt,delete,encrypt,get,import,list,purge,recover,restore,sign,unwrapKey,update,verifyandwrapKey.- Secret
Permissions []string List of secret permissions, must be one or more from the following:
backup,delete,get,list,purge,recover,restoreandset.- Storage
Permissions []string List of storage permissions, must be one or more from the following:
backup,delete,deletesas,get,getsas,list,listsas,purge,recover,regeneratekey,restore,set,setsasandupdate.
- key
Vault stringId Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
- object
Id string The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
- tenant
Id string The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
- application
Id string The object ID of an Application in Azure Active Directory.
- certificate
Permissions string[] List of certificate permissions, must be one or more from the following:
backup,create,delete,deleteissuers,get,getissuers,import,list,listissuers,managecontacts,manageissuers,purge,recover,restore,setissuersandupdate.- key
Permissions string[] List of key permissions, must be one or more from the following:
backup,create,decrypt,delete,encrypt,get,import,list,purge,recover,restore,sign,unwrapKey,update,verifyandwrapKey.- secret
Permissions string[] List of secret permissions, must be one or more from the following:
backup,delete,get,list,purge,recover,restoreandset.- storage
Permissions string[] List of storage permissions, must be one or more from the following:
backup,delete,deletesas,get,getsas,list,listsas,purge,recover,regeneratekey,restore,set,setsasandupdate.
- key_
vault_ strid Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
- object_
id str The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
- tenant_
id str The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
- application_
id str The object ID of an Application in Azure Active Directory.
- certificate_
permissions List[str] List of certificate permissions, must be one or more from the following:
backup,create,delete,deleteissuers,get,getissuers,import,list,listissuers,managecontacts,manageissuers,purge,recover,restore,setissuersandupdate.- key_
permissions List[str] List of key permissions, must be one or more from the following:
backup,create,decrypt,delete,encrypt,get,import,list,purge,recover,restore,sign,unwrapKey,update,verifyandwrapKey.- secret_
permissions List[str] List of secret permissions, must be one or more from the following:
backup,delete,get,list,purge,recover,restoreandset.- storage_
permissions List[str] List of storage permissions, must be one or more from the following:
backup,delete,deletesas,get,getsas,list,listsas,purge,recover,regeneratekey,restore,set,setsasandupdate.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessPolicy resource produces the following output properties:
Look up an Existing AccessPolicy Resource
Get an existing AccessPolicy 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?: AccessPolicyState, opts?: CustomResourceOptions): AccessPolicystatic get(resource_name, id, opts=None, application_id=None, certificate_permissions=None, key_permissions=None, key_vault_id=None, object_id=None, secret_permissions=None, storage_permissions=None, tenant_id=None, __props__=None);func GetAccessPolicy(ctx *Context, name string, id IDInput, state *AccessPolicyState, opts ...ResourceOption) (*AccessPolicy, error)public static AccessPolicy Get(string name, Input<string> id, AccessPolicyState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Application
Id string The object ID of an Application in Azure Active Directory.
- Certificate
Permissions List<string> List of certificate permissions, must be one or more from the following:
backup,create,delete,deleteissuers,get,getissuers,import,list,listissuers,managecontacts,manageissuers,purge,recover,restore,setissuersandupdate.- Key
Permissions List<string> List of key permissions, must be one or more from the following:
backup,create,decrypt,delete,encrypt,get,import,list,purge,recover,restore,sign,unwrapKey,update,verifyandwrapKey.- Key
Vault stringId Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
- Object
Id string The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
- Secret
Permissions List<string> List of secret permissions, must be one or more from the following:
backup,delete,get,list,purge,recover,restoreandset.- Storage
Permissions List<string> List of storage permissions, must be one or more from the following:
backup,delete,deletesas,get,getsas,list,listsas,purge,recover,regeneratekey,restore,set,setsasandupdate.- Tenant
Id string The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
- Application
Id string The object ID of an Application in Azure Active Directory.
- Certificate
Permissions []string List of certificate permissions, must be one or more from the following:
backup,create,delete,deleteissuers,get,getissuers,import,list,listissuers,managecontacts,manageissuers,purge,recover,restore,setissuersandupdate.- Key
Permissions []string List of key permissions, must be one or more from the following:
backup,create,decrypt,delete,encrypt,get,import,list,purge,recover,restore,sign,unwrapKey,update,verifyandwrapKey.- Key
Vault stringId Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
- Object
Id string The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
- Secret
Permissions []string List of secret permissions, must be one or more from the following:
backup,delete,get,list,purge,recover,restoreandset.- Storage
Permissions []string List of storage permissions, must be one or more from the following:
backup,delete,deletesas,get,getsas,list,listsas,purge,recover,regeneratekey,restore,set,setsasandupdate.- Tenant
Id string The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
- application
Id string The object ID of an Application in Azure Active Directory.
- certificate
Permissions string[] List of certificate permissions, must be one or more from the following:
backup,create,delete,deleteissuers,get,getissuers,import,list,listissuers,managecontacts,manageissuers,purge,recover,restore,setissuersandupdate.- key
Permissions string[] List of key permissions, must be one or more from the following:
backup,create,decrypt,delete,encrypt,get,import,list,purge,recover,restore,sign,unwrapKey,update,verifyandwrapKey.- key
Vault stringId Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
- object
Id string The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
- secret
Permissions string[] List of secret permissions, must be one or more from the following:
backup,delete,get,list,purge,recover,restoreandset.- storage
Permissions string[] List of storage permissions, must be one or more from the following:
backup,delete,deletesas,get,getsas,list,listsas,purge,recover,regeneratekey,restore,set,setsasandupdate.- tenant
Id string The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
- application_
id str The object ID of an Application in Azure Active Directory.
- certificate_
permissions List[str] List of certificate permissions, must be one or more from the following:
backup,create,delete,deleteissuers,get,getissuers,import,list,listissuers,managecontacts,manageissuers,purge,recover,restore,setissuersandupdate.- key_
permissions List[str] List of key permissions, must be one or more from the following:
backup,create,decrypt,delete,encrypt,get,import,list,purge,recover,restore,sign,unwrapKey,update,verifyandwrapKey.- key_
vault_ strid Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
- object_
id str The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
- secret_
permissions List[str] List of secret permissions, must be one or more from the following:
backup,delete,get,list,purge,recover,restoreandset.- storage_
permissions List[str] List of storage permissions, must be one or more from the following:
backup,delete,deletesas,get,getsas,list,listsas,purge,recover,regeneratekey,restore,set,setsasandupdate.- tenant_
id str The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.