The Azure Key Vault Plugin integrates RightScale Self-Service with the basic functionality of the Azure Key Vault API.
- A general understanding CAT development and definitions
- Refer to the guide documentation for details SS Guides
- The
admin,ss_designer&ss_end_userroles, in a RightScale account with SelfService enabled.adminis needed to retrieved the RightScale Credential values identified below. - Azure Service Principal (AKA Azure Active Directory Application) with the appropriate permissions to manage resources in the target subscription
- The following RightScale Credentials
AZURE_APPLICATION_IDAZURE_APPLICATION_KEY
- The following packages are also required (See the Installation section for details):
- Be sure your RightScale account has Self-Service enabled
- Connect AzureRM Cloud credentials to your RightScale account (if not already completed)
- Follow steps to Create an Azure Active Directory Application
- Grant the Azure AD Application access to the necessary subscription(s)
- Retrieve the Application ID & Authentication Key
- Create RightScale Credentials with values that match the Application ID (Credential name:
AZURE_APPLICATION_ID) & Authentication Key (Credential name:AZURE_APPLICATION_KEY) - Retrieve your Tenant ID
- Update
azure_keyvault_plugin.rbPlugin with your Tenant ID.- Replace "TENANT_ID" in
token_url "https://login.microsoftonline.com/TENANT_ID/oauth2/token"with your Tenant ID
- Replace "TENANT_ID" in
- Navigate to the appropriate Self-Service portal
- For more details on using the portal review the SS User Interface Guide
- In the Design section, use the
Upload CATinterface to complete the following:- Upload each of packages listed in the Requirements Section
- Upload the
azure_keyvault_plugin.rbfile located in this repository
The Azure Key Vault Plugin has been packaged as plugins/rs_azure_keyvault. In order to use this plugin you must import this plugin into a CAT.
import "plugins/rs_azure_keyvault"For more information on using packages, please refer to the RightScale online documentation. Importing a Package
Azure Key Vault resources can now be created by specifying a resource declaration with the desired fields. See the Supported Actions section for a full list of supported actions. The resulting resource can be manipulated just like the native RightScale resources in RCL and CAT. See the Examples Section for more examples and complete CAT's.
- vaults
resource "my_vault", type: "rs_azure_keyvault.vaults" do
name join(["my_vault-",last(split(@@deployment.href, "/"))])
resource_group "DF-Testing"
location "Central US"
properties do {
"accessPolicies" => [],
"createMode" => "default",
"enableSoftDelete" => "true",
"enabledForDeployment" => "true",
"enabledForDiskEncryption" => "false",
"enabledForTemplateDeployment" => "false",
"sku" => {
"family" => "A",
"name" => "standard"
},
"tenantId" => "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
} end
end| Field Name | Required? | Description |
|---|---|---|
| name | Yes | The name of the Key Vault in the specified subscription and resource group. |
| resource_group | Yes | The name of the resource group. |
| location | Yes | Datacenter to launch in |
| properties | Yes | Properties of the Key Vault object |
| tags | No | Tag values |
| Action | API Implementation | Support Level |
|---|---|---|
| create & update | Create Or Update | Supported |
| destroy | Delete | Supported |
| get & show | Get | Supported |
| list by resource group | List By Resource Group | Supported |
- id
- name
- location
- tags
- properties
- type
- access_policies
- create_mode
- enable_soft_delete
- enabled_for_deployment
- enabled_for_disk_encryption
- enabled_for_template_deployment
- sku
- vault_uri
- The Azure Key Vault Plugin makes no attempt to support non-Azure resources. (i.e. Allow the passing the RightScale or other resources as arguments to a Key Vault resource.)
Full list of possible actions can be found on the Azure Key Vault API Documentation
Please review keyvault_test_cat.rb for a basic example implementation.
- Currently only supports Vault resources due to API endpoint challenges with Key/Cert/Secret resources
The Azure Key Vault Plugin source code is subject to the MIT license, see the LICENSE file.