Skip to content

Commit c9c4b33

Browse files
anvitha-jainlhercot
authored andcommitted
Added resources to generate Microsoft vmm domain objects
1 parent e53fc22 commit c9c4b33

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

examples/aci_vmm_domain/main.tf

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ resource "aci_vlan_pool" "vmm_vlan_pool" {
1818
alloc_mode = "dynamic"
1919
}
2020

21+
// VMWare vmm domain resources
2122
resource "aci_vmm_domain" "vds" {
22-
provider_profile_dn = var.provider_profile_dn
23+
provider_profile_dn = var.vds
2324
relation_infra_rs_vlan_ns = aci_vlan_pool.vmm_vlan_pool.id
2425
name = var.vmm_domain
2526
}
@@ -56,7 +57,6 @@ resource "aci_cdp_interface_policy" "foocdp_interface_policy" {
5657
name = "cdpIfPol1"
5758
}
5859

59-
6060
resource "aci_vswitch_policy" "vmware_switch_policy" {
6161
vmm_domain_dn = aci_vmm_domain.vds.id
6262
relation_vmm_rs_vswitch_exporter_pol {
@@ -70,3 +70,42 @@ resource "aci_vswitch_policy" "vmware_switch_policy" {
7070
relation_vmm_rs_vswitch_override_lacp_pol = aci_lacp_policy.port_channel_policy.id
7171
relation_vmm_rs_vswitch_override_lldp_if_pol = aci_lldp_interface_policy.LLDP_policy.id
7272
}
73+
74+
// Microsoft vmm domain resources
75+
resource "aci_vmm_domain" "microsoft_domain" {
76+
provider_profile_dn = var.microsoft_domain
77+
relation_infra_rs_vlan_ns = aci_vlan_pool.vmm_vlan_pool.id
78+
name = var.vmm_domain
79+
}
80+
81+
resource "aci_vmm_controller" "microsoft_controller" {
82+
vmm_domain_dn = aci_vmm_domain.microsoft_domain.id
83+
name = var.aci_vmm_controller
84+
host_or_ip = "10.10.10.10"
85+
root_cont_name = "vmmdc"
86+
scope = "MicrosoftSCVMM"
87+
}
88+
89+
resource "aci_vmm_credential" "microsoft_credential" {
90+
vmm_domain_dn = aci_vmm_domain.microsoft_domain.id
91+
name = var.aci_vmm_credential
92+
pwd = "mySecretPassword"
93+
usr = "myUsername"
94+
}
95+
96+
resource "aci_vmm_controller" "microsoft_controller_2" {
97+
vmm_domain_dn = aci_vmm_domain.microsoft_domain.id
98+
relation_vmm_rs_acc = aci_vmm_credential.microsoft_credential.id
99+
name = "microsoft_controller_2"
100+
host_or_ip = "10.10.10.1"
101+
root_cont_name = "vmmdc"
102+
scope = "MicrosoftSCVMM"
103+
}
104+
105+
resource "aci_vswitch_policy" "microsoft_switch_policy" {
106+
vmm_domain_dn = aci_vmm_domain.microsoft_domain.id
107+
relation_vmm_rs_vswitch_override_cdp_if_pol = aci_cdp_interface_policy.foocdp_interface_policy.id
108+
relation_vmm_rs_vswitch_override_lacp_pol = aci_lacp_policy.port_channel_policy.id
109+
relation_vmm_rs_vswitch_override_lldp_if_pol = aci_lldp_interface_policy.LLDP_policy.id
110+
relation_vmm_rs_vswitch_override_stp_pol = "uni/infra/ifPol-stpPolicy"
111+
}

examples/aci_vmm_domain/variables.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
variable "provider_profile_dn" {
1+
variable "vds" {
22
default = "uni/vmmp-VMware"
33
}
44

@@ -12,4 +12,8 @@ variable "aci_vmm_controller" {
1212

1313
variable "aci_vmm_credential" {
1414
default = "vmm_cred"
15-
}
15+
}
16+
17+
variable "microsoft_domain" {
18+
default = "uni/vmmp-Microsoft"
19+
}

0 commit comments

Comments
 (0)