From 4ae86d19e70a0a199605e3ea535c99e7f6bf5a10 Mon Sep 17 00:00:00 2001 From: Patrick Marschik Date: Fri, 15 May 2020 13:28:20 +0200 Subject: [PATCH] Add "inbound_services" to google_app_engine_standard_app_version --- ...esource_app_engine_standard_app_version.go | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/google/resource_app_engine_standard_app_version.go b/google/resource_app_engine_standard_app_version.go index b896131f726..cced247a212 100644 --- a/google/resource_app_engine_standard_app_version.go +++ b/google/resource_app_engine_standard_app_version.go @@ -323,6 +323,14 @@ All URLs that begin with this prefix are handled by this handler, using the port }, }, }, + "inbound_services": { + Type: schema.TypeList, + Optional: true, + Description: `Before an application can receive email or XMPP messages, the application must be configured to enable the service.`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, "instance_class": { Type: schema.TypeString, Computed: true, @@ -476,6 +484,12 @@ func resourceAppEngineStandardAppVersionCreate(d *schema.ResourceData, meta inte } else if v, ok := d.GetOkExists("entrypoint"); !isEmptyValue(reflect.ValueOf(entrypointProp)) && (ok || !reflect.DeepEqual(v, entrypointProp)) { obj["entrypoint"] = entrypointProp } + inboundServicesProp, err := expandAppEngineFlexibleAppVersionInboundServices(d.Get("inbound_services"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("inbound_services"); !isEmptyValue(reflect.ValueOf(inboundServicesProp)) && (ok || !reflect.DeepEqual(v, inboundServicesProp)) { + obj["inboundServices"] = inboundServicesProp + } instanceClassProp, err := expandAppEngineStandardAppVersionInstanceClass(d.Get("instance_class"), d, config) if err != nil { return err @@ -591,6 +605,9 @@ func resourceAppEngineStandardAppVersionRead(d *schema.ResourceData, meta interf if err := d.Set("libraries", flattenAppEngineStandardAppVersionLibraries(res["libraries"], d, config)); err != nil { return fmt.Errorf("Error reading StandardAppVersion: %s", err) } + if err := d.Set("inbound_services", flattenAppEngineFlexibleAppVersionInboundServices(res["inboundServices"], d, config)); err != nil { + return fmt.Errorf("Error reading StandardAppVersion: %s", err) + } if err := d.Set("instance_class", flattenAppEngineStandardAppVersionInstanceClass(res["instanceClass"], d, config)); err != nil { return fmt.Errorf("Error reading StandardAppVersion: %s", err) } @@ -670,6 +687,12 @@ func resourceAppEngineStandardAppVersionUpdate(d *schema.ResourceData, meta inte } else if v, ok := d.GetOkExists("entrypoint"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, entrypointProp)) { obj["entrypoint"] = entrypointProp } + inboundServicesProp, err := expandAppEngineFlexibleAppVersionInboundServices(d.Get("inbound_services"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("inbound_services"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, inboundServicesProp)) { + obj["inboundServices"] = inboundServicesProp + } instanceClassProp, err := expandAppEngineStandardAppVersionInstanceClass(d.Get("instance_class"), d, config) if err != nil { return err