diff --git a/google/apigee_instance_attachment.go b/google/apigee_instance_attachment.go new file mode 100644 index 000000000..4681fb4b5 --- /dev/null +++ b/google/apigee_instance_attachment.go @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package google + +import "reflect" + +func GetApigeeInstanceAttachmentCaiObject(d TerraformResourceData, config *Config) ([]Asset, error) { + name, err := assetName(d, config, "//apigee.googleapis.com/{{instance_id}}/attachments/{{name}}") + if err != nil { + return []Asset{}, err + } + if obj, err := GetApigeeInstanceAttachmentApiObject(d, config); err == nil { + return []Asset{{ + Name: name, + Type: "apigee.googleapis.com/InstanceAttachment", + Resource: &AssetResource{ + Version: "v1", + DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/apigee/v1/rest", + DiscoveryName: "InstanceAttachment", + Data: obj, + }, + }}, nil + } else { + return []Asset{}, err + } +} + +func GetApigeeInstanceAttachmentApiObject(d TerraformResourceData, config *Config) (map[string]interface{}, error) { + obj := make(map[string]interface{}) + environmentProp, err := expandApigeeInstanceAttachmentEnvironment(d.Get("environment"), d, config) + if err != nil { + return nil, err + } else if v, ok := d.GetOkExists("environment"); !isEmptyValue(reflect.ValueOf(environmentProp)) && (ok || !reflect.DeepEqual(v, environmentProp)) { + obj["environment"] = environmentProp + } + + return obj, nil +} + +func expandApigeeInstanceAttachmentEnvironment(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) { + return v, nil +}