-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.tf
35 lines (30 loc) · 794 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
resource "artifactory_local_repository" "this" {
key = var.key
package_type = var.package_type
repo_layout_ref = var.repo_layout[var.package_type]
description = var.description
xray_index = var.xray_index
}
resource "random_password" "this" {
length = 16
special = true
}
resource "artifactory_user" "this" {
name = var.key
password = random_password.this.result
email = var.email
profile_updatable = false
disable_ui_access = true
}
resource "artifactory_permission_target" "this" {
name = var.key
repo {
repositories = [artifactory_local_repository.this.key]
actions {
users {
name = artifactory_user.this.name
permissions = ["read", "write"]
}
}
}
}