Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for egress_settings on google_app_engine_standard_app_version… #12534

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions google/resource_app_engine_standard_app_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,15 @@ Substitute '<language>' with 'python', 'java', 'php', 'ruby', 'go' or 'nodejs'.`
Required: true,
Description: `Full Serverless VPC Access Connector name e.g. /projects/my-project/locations/us-central1/connectors/c1.`,
},
"egress_setting": {
Type: schema.TypeString,
Optional: true,
Description: `The egress setting for the connector, controlling what traffic is diverted through it.`,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validateEnum([]string{"EGRESS_SETTING_UNSPECIFIED", "ALL_TRAFFIC", "PRIVATE_IP_RANGES"}),
},
},
},
},
},
Expand Down Expand Up @@ -1751,6 +1760,12 @@ func expandAppEngineStandardAppVersionVPCAccessConnector(v interface{}, d Terraf
} else if val := reflect.ValueOf(transformedName); val.IsValid() && !isEmptyValue(val) {
transformed["name"] = transformedName
}
transformedEgressSetting, err := expandAppEngineStandardAppVersionVPCAccessConnectorEgressSetting(original["egress_setting"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedEgressSetting); val.IsValid() && !isEmptyValue(val) {
transformed["egressSetting"] = transformedEgressSetting
}

return transformed, nil
}
Expand All @@ -1759,6 +1774,10 @@ func expandAppEngineStandardAppVersionVPCAccessConnectorName(v interface{}, d Te
return v, nil
}

func expandAppEngineStandardAppVersionVPCAccessConnectorEgressSetting(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
return v, nil
}

func expandAppEngineStandardAppVersionInboundServices(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
v = v.(*schema.Set).List()
return v, nil
Expand Down