-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovider.tf
47 lines (44 loc) · 1.37 KB
/
provider.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
36
37
38
39
40
41
42
43
44
45
46
47
#_______________________________________________________________________
#
# Terraform Required Parameters:
# - ACI Provider
# https://registry.terraform.io/providers/CiscoDevNet/aci/latest
# - MSO Provider
# https://registry.terraform.io/providers/CiscoDevNet/mso/latest
# - Utils Provider
# https://registry.terraform.io/providers/netascode/utils/latest
#_______________________________________________________________________
terraform {
required_providers {
aci = {
source = "CiscoDevNet/aci"
version = "2.13.0"
}
mso = {
source = "CiscoDevNet/mso"
version = "1.0.0"
}
utils = {
source = "netascode/utils"
version = "0.2.5"
}
}
required_version = ">= 1.3.0"
}
provider "aci" {
cert_name = local.host.certificate_name
password = local.host.auth_type == "password" ? var.apic_password : ""
private_key = local.host.auth_type == "certificate" ? file(var.apic_private_key) : ""
url = "https://${local.host.hostname}"
username = length(compact([local.host.domain])
) > 0 ? "apic#${local.host.domain}\\${local.host.username}" : local.host.username
insecure = true
}
provider "mso" {
domain = local.host.domain == "" ? "local" : local.host.domain
insecure = true
password = var.ndo_password
platform = "nd"
url = "https://${local.host.hostname}"
username = local.host.username
}