Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
arkiaconsulting committed Oct 3, 2020
1 parent b8e9b02 commit c3dc144
Showing 1 changed file with 34 additions and 13 deletions.
47 changes: 34 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
This terraform provider will allow the creation the Azure App Configuration resources, be they simple values or Key Vault secret references.

## Usage example
```
# Configure the Akc App Configuration provider
### Resource
#### Configure the Akc App Configuration provider
```terraform
terraform {
required_providers {
akc = {
Expand All @@ -15,39 +15,60 @@ terraform {
provider "akc" {
}
# Create an App Configuration key-value
```
#### Create an App Configuration key-value
```terraform
resource "akc_key_value" "test" {
endpoint = azurerm_app_configuration.test.endpoint
key = "Key"
value = "my config value"
}
# Create an App Configuration key-value with label
```
#### Create an App Configuration key-value with label
```terraform
resource "akc_key_value" "config_value" {
endpoint = azurerm_app_configuration.test.endpoint
label = "Dev"
key = "Key"
value = "my config value"
}
# Create an App Configuration key-value with Key Vault secret reference
```
#### Create an App Configuration key-value with Key Vault secret reference
```terraform
resource "akc_key_secret" "config_secret" {
endpoint = azurerm_app_configuration.test.endpoint
label = "Dev"
key = "storage-connection-string"
secret_id = azurerm_key_vault_secret.secret.id
latest_version = true # Trim or not the version information (default to false)
}
```

### DataSource
#### Source an existing key-value
```terraform
data "akc_key_value" "my_value" {
endpoint = azurerm_app_configuration.test.endpoint
label = "Dev"
key = "Key"
}
```
*Reference the resulting value using `data.akc_key_value.my_value.value`*

#### Source an existing key-secret
```terraform
data "akc_key_secret" "my_secret_id" {
endpoint = azurerm_app_configuration.test.endpoint
label = "Dev"
key = "Key"
}
```
*Reference the resulting secret Id using `data.akc_key_value.my_secret_id.secret_id`*

## Authorization
The provider uses the current Azure CLI credentials if available, and fall back to environment variables.

The identity must have be assigned the RBAC role `App Configuration Data Owner`.
The identity must have be assigned the RBAC role `App Configuration Data Owner`, or at least `App Configuration Data Reader` in order to use the data source.

## Installation
The provider is available on the terraform registry

0 comments on commit c3dc144

Please sign in to comment.