Skip to content

Commit

Permalink
change deprecation warning, enclose some more parts with feature toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Helmerich committed May 22, 2019
1 parent 375cc1e commit 7f97253
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func resourceComputeNetworkPeering() *schema.Resource {
"auto_create_routes": {
Type: schema.TypeBool,
Optional: true,
Deprecated: "auto_create_routes is deprecated use exchange_subnet_routes instead",
Deprecated: "auto_create_routes has been deprecated because it's redundant and not user-configurable. It can safely be removed from your config",
ForceNew: true,
Default: true,
},
Expand Down Expand Up @@ -184,8 +184,10 @@ func findPeeringFromNetwork(network *computeBeta.Network, peeringName string) *c
}
func expandNetworkPeering(d *schema.ResourceData) *computeBeta.NetworkPeering {
return &computeBeta.NetworkPeering{
<% unless version == 'ga' -%>
ExportCustomRoutes: d.Get("export_custom_routes").(bool),
ImportCustomRoutes: d.Get("import_custom_routes").(bool),
<% end -%>
// auto_create_routes was replaced by exchange_subnet_routes in the network peering object
ExchangeSubnetRoutes: true,
Name: d.Get("name").(string),
Expand Down

0 comments on commit 7f97253

Please sign in to comment.