diff --git a/third_party/terraform/resources/resource_compute_security_policy.go.erb b/third_party/terraform/resources/resource_compute_security_policy.go.erb index de865f82f708..b483f4f5e10d 100644 --- a/third_party/terraform/resources/resource_compute_security_policy.go.erb +++ b/third_party/terraform/resources/resource_compute_security_policy.go.erb @@ -95,7 +95,6 @@ func resourceComputeSecurityPolicy() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"SRC_IPS_V1"}, false), }, -<% unless version == 'ga' -%> "expr": { Type: schema.TypeList, Optional: true, @@ -122,7 +121,6 @@ func resourceComputeSecurityPolicy() *schema.Resource { }, }, }, -<% end -%> }, }, }, @@ -360,9 +358,7 @@ func expandSecurityPolicyMatch(configured []interface{}) *compute.SecurityPolicy return &compute.SecurityPolicyRuleMatcher{ VersionedExpr: data["versioned_expr"].(string), Config: expandSecurityPolicyMatchConfig(data["config"].([]interface{})), -<% unless version == 'ga' -%> Expr: expandSecurityPolicyMatchExpr(data["expr"].([]interface{})), -<% end -%> } } @@ -377,7 +373,6 @@ func expandSecurityPolicyMatchConfig(configured []interface{}) *compute.Security } } -<% unless version == 'ga' -%> func expandSecurityPolicyMatchExpr(expr []interface{}) *compute.Expr { if len(expr) == 0 || expr[0] == nil { return nil @@ -392,7 +387,6 @@ func expandSecurityPolicyMatchExpr(expr []interface{}) *compute.Expr { // Location: data["location"].(string), } } -<% end -%> func flattenSecurityPolicyRules(rules []*compute.SecurityPolicyRule) []map[string]interface{} { rulesSchema := make([]map[string]interface{}, 0, len(rules)) @@ -418,9 +412,7 @@ func flattenMatch(match *compute.SecurityPolicyRuleMatcher) []map[string]interfa data := map[string]interface{}{ "versioned_expr": match.VersionedExpr, "config": flattenMatchConfig(match.Config), -<% unless version == 'ga' -%> "expr": flattenMatchExpr(match), -<% end -%> } return []map[string]interface{}{data} @@ -438,7 +430,6 @@ func flattenMatchConfig(conf *compute.SecurityPolicyRuleMatcherConfig) []map[str return []map[string]interface{}{data} } -<% unless version == 'ga' -%> func flattenMatchExpr(match *compute.SecurityPolicyRuleMatcher) []map[string]interface{} { if match.Expr == nil { return nil @@ -454,7 +445,6 @@ func flattenMatchExpr(match *compute.SecurityPolicyRuleMatcher) []map[string]int return []map[string]interface{}{data} } -<% end -%> func resourceSecurityPolicyStateImporter(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { config := meta.(*Config)