Skip to content

Commit c332419

Browse files
Merge pull request #137 from xinyuezhao/aci_epg_to_domain
[aci_epg_to_domain] force resource 'aci_epg_to_domain' to be replaced when 'tDn' changed
2 parents 7e9b4df + dd2c1a8 commit c332419

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

aci/resource_aci_fvrsdomatt.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ func resourceAciDomain() *schema.Resource {
2727
"application_epg_dn": &schema.Schema{
2828
Type: schema.TypeString,
2929
Required: true,
30+
ForceNew: true,
3031
},
3132

3233
"tdn": &schema.Schema{
3334
Type: schema.TypeString,
3435
Required: true,
36+
ForceNew: true,
3537
},
3638

3739
"binding_type": &schema.Schema{
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
resource "aci_tenant" "terraform_tenant" {
2+
name = "tf_tenant"
3+
description = "This tenant is created by terraform"
4+
}
5+
6+
resource "aci_application_profile" "terraform_ap" {
7+
tenant_dn = aci_tenant.terraform_tenant.id
8+
name = "tf_ap"
9+
}
10+
11+
resource "aci_application_epg" "terraform_epg" {
12+
application_profile_dn = aci_application_profile.terraform_ap.id
13+
name = "tf_epg"
14+
}
15+
16+
#ENSURE DOMAIN IS BOUND TO EPG
17+
resource "aci_epg_to_domain" "terraform_epg_domain" {
18+
application_epg_dn = aci_application_epg.terraform_epg.id
19+
tdn = "uni/vmmp-VMware/dom-aci_terraform_lab"
20+
vmm_allow_promiscuous = "accept"
21+
vmm_forged_transmits = "reject"
22+
vmm_mac_changes = "accept"
23+
}
24+

examples/aci_epg_to_domain/main.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#configure provider with your cisco aci credentials.
2+
provider "aci" {
3+
username = ""
4+
password = ""
5+
url = ""
6+
insecure = true
7+
}
8+
9+
# provider "aci" {
10+
# username = ""
11+
# private_key = ""
12+
# cert_name = ""
13+
# url = ""
14+
# insecure = true
15+
# }

0 commit comments

Comments
 (0)