This repository was archived by the owner on Jan 13, 2025. It is now read-only.
Commit e42b66f Christophe - CC4
committed
1 parent 847e470 commit e42b66f Copy full SHA for e42b66f
File tree 3 files changed +18
-98
lines changed
applications/modules/vault
3 files changed +18
-98
lines changed Original file line number Diff line number Diff line change 1
- resource "vault_auth_backend" "registration-cert " {
2
- path = " registration-cert "
3
- type = " cert "
1
+ resource "vault_auth_backend" "registration" {
2
+ type = " approle "
3
+ path = " registration "
4
4
}
5
5
6
- resource "vault_cert_auth_backend_role" "registration-cert" {
7
- name = " registration-cert"
8
- backend = vault_auth_backend. registration-cert . path
9
-
10
- certificate = vault_pki_secret_backend_intermediate_set_signed. registration_intermediate . certificate
11
- allowed_organizational_units = [" Registration" ]
12
- allowed_common_names = [" registration.${ var . domain } " ]
6
+ resource "vault_approle_auth_backend_role" "registration-role" {
7
+ backend = vault_auth_backend. registration . path
8
+ role_name = " registration-role"
9
+ token_policies = [" devices-${ var . domain } " ]
13
10
14
11
token_ttl = 300
15
12
token_max_ttl = 600
16
- token_policies = [vault_policy . devices-policy . name ]
13
+ }
14
+
15
+ resource "vault_approle_auth_backend_role_secret_id" "registration-secret-id" {
16
+ backend = vault_auth_backend. registration . path
17
+ role_name = vault_approle_auth_backend_role. registration-role . role_name
18
+ }
19
+
20
+ resource "vault_approle_auth_backend_login" "login" {
21
+ backend = vault_auth_backend. registration . path
22
+ role_id = vault_approle_auth_backend_role. registration-role . role_id
23
+ secret_id = vault_approle_auth_backend_role_secret_id. registration-secret-id . secret_id
17
24
}
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments