Skip to content

Commit

Permalink
add auto_hvn_to_hvn_peering
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshasselberg committed Jun 23, 2021
1 parent cd54815 commit 1f47195
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/resources/hcp_consul_cluster/federation.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ resource "hcp_consul_cluster" "primary" {
}

resource "hcp_consul_cluster" "secondary" {
hvn_id = hcp_hvn.example.hvn_id
cluster_id = "consul-cluster-secondary"
tier = "development"
primary_link = hcp_consul_cluster.primary.self_link
hvn_id = hcp_hvn.example.hvn_id
cluster_id = "consul-cluster-secondary"
tier = "development"
primary_link = hcp_consul_cluster.primary.self_link
auto_hvn_to_hvn_peering = true
}
6 changes: 6 additions & 0 deletions internal/provider/resource_consul_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ func resourceConsulCluster() *schema.Resource {
return strings.ToLower(old) == strings.ToLower(new)
},
},
"auto_hvn_to_hvn_peering": {
Description: "Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.",
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
},
// computed outputs
"organization_id": {
Description: "The ID of the organization this HCP Consul cluster is located in.",
Expand Down

0 comments on commit 1f47195

Please sign in to comment.