-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add conditional expressions to allow some global properties and…
… updated documentation
- Loading branch information
dkool
authored and
dkool
committed
Mar 8, 2024
1 parent
2a6d249
commit da57a20
Showing
6 changed files
with
166 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
This example highlights the complete usage. | ||
|
||
## Usage | ||
|
||
```hcl | ||
module "kv" { | ||
source = "cloudnationhq/kv/azure" | ||
version = "~> 0.1" | ||
naming = local.naming | ||
vault = { | ||
name = module.naming.key_vault.name_unique | ||
location = module.rg.groups.demo.location | ||
resourcegroup = module.rg.groups.demo.name | ||
certs = local.certs | ||
keys = local.keys | ||
secrets = local.secrets | ||
issuers = { | ||
DigiCert = { | ||
org_id = "12345" | ||
account_id = "12345" | ||
password = "12345" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
The module uses the below locals for configuration: | ||
|
||
```hcl | ||
locals { | ||
secrets = { | ||
random_string = { | ||
secret1 = { | ||
length = 24 | ||
special = false | ||
} | ||
} | ||
tls_keys = { | ||
tls1 = { | ||
algorithm = "RSA" | ||
rsa_bits = 2048 | ||
} | ||
} | ||
} | ||
keys = { | ||
key1 = { | ||
key_type = "RSA" | ||
key_size = 2048 | ||
key_opts = [ | ||
"decrypt", "encrypt", "sign", | ||
"unwrapKey", "verify", "wrapKey" | ||
] | ||
rotation_policy = { | ||
expire_after = "P90D" | ||
notify_before_expiry = "P30D" | ||
automatic = { | ||
time_after_creation = "P83D" | ||
time_before_expiry = "P30D" | ||
} | ||
} | ||
} | ||
} | ||
certs = { | ||
cert1 = { | ||
issuer = "Self" | ||
subject = "CN=app1.demo.org" | ||
validity_in_months = 12 | ||
exportable = true | ||
key_usage = [ | ||
"cRLSign", "dataEncipherment", | ||
"digitalSignature", "keyAgreement", | ||
"keyCertSign", "keyEncipherment" | ||
] | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters