{"action":"created","comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/comments/174827386","pull_request_review_id":104241445,"id":174827386,"diff_hunk":"@@ -0,0 +1,618 @@\n+package opentelekomcloud\n+\n+import (\n+\t\"fmt\"\n+\t\"log\"\n+\n+\t\"github.com/hashicorp/terraform/helper/resource\"\n+\t\"github.com/hashicorp/terraform/helper/schema\"\n+\t\"github.com/huaweicloud/golangsdk\"\n+\t\"github.com/huaweicloud/golangsdk/openstack/rds/v1/instances\"\n+\t\"strings\"\n+\t\"time\"\n+)\n+\n+func resourceRdsInstance() *schema.Resource {\n+\treturn &schema.Resource{\n+\t\tCreate: resourceInstanceCreate,\n+\t\tRead:   resourceInstanceRead,\n+\t\tDelete: resourceInstanceDelete,\n+\t\tUpdate: resourceInstanceUpdate,\n+\t\tImporter: &schema.ResourceImporter{\n+\t\t\tState: schema.ImportStatePassthrough,\n+\t\t},\n+\n+\t\tTimeouts: &schema.ResourceTimeout{\n+\t\t\tCreate: schema.DefaultTimeout(30 * time.Minute),\n+\t\t\tDelete: schema.DefaultTimeout(30 * time.Minute),\n+\t\t},\n+\n+\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\"region\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t},\n+\n+\t\t\t\"name\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t\tForceNew: false,\n+\t\t\t},\n+\n+\t\t\t\"datastore\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeList,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t\tMaxItems: 1,\n+\t\t\t\tElem: &schema.Resource{\n+\t\t\t\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\t\t\t\"type\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeString,\n+\t\t\t\t\t\t\tRequired: true,\n+\t\t\t\t\t\t\tForceNew: true,\n+\t\t\t\t\t\t\tValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {\n+\t\t\t\t\t\t\t\treturn ValidateStringList(v, k, []string{\"PostgreSQL\", \"SQLServer\", \"MySQL\"})\n+\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t},\n+\t\t\t\t\t\t\"version\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeString,\n+\t\t\t\t\t\t\tRequired: true,\n+\t\t\t\t\t\t\tForceNew: true,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t}},\n+\t\t\t},\n+\n+\t\t\t\"flavorref\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: false,\n+\t\t\t},\n+\n+\t\t\t\"volume\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeList,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: false,\n+\t\t\t\tMaxItems: 1,\n+\t\t\t\tElem: &schema.Resource{\n+\t\t\t\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\t\t\t\"type\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeString,\n+\t\t\t\t\t\t\tRequired: true,\n+\t\t\t\t\t\t\tForceNew: true,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t\t\"size\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeInt,\n+\t\t\t\t\t\t\tRequired: true,\n+\t\t\t\t\t\t\tForceNew: false,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t}},\n+\t\t\t},\n+\n+\t\t\t\"availabilityzone\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t},\n+\n+\t\t\t\"vpc\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t},\n+\n+\t\t\t\"nics\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeList,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t\tMaxItems: 1,\n+\t\t\t\tElem: &schema.Resource{\n+\t\t\t\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\t\t\t\"subnetid\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeString,\n+\t\t\t\t\t\t\tRequired: true,\n+\t\t\t\t\t\t\tForceNew: true,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t}},\n+\t\t\t},\n+\n+\t\t\t\"securitygroup\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeList,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t\tMaxItems: 1,\n+\t\t\t\tElem: &schema.Resource{\n+\t\t\t\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\t\t\t\"id\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeString,\n+\t\t\t\t\t\t\tRequired: true,\n+\t\t\t\t\t\t\tForceNew: true,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t}},\n+\t\t\t},\n+\n+\t\t\t\"dbport\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t},\n+\n+\t\t\t\"backupstrategy\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeList,\n+\t\t\t\tOptional: true,\n+\t\t\t\tForceNew: false,\n+\t\t\t\tMaxItems: 1,\n+\t\t\t\tElem: &schema.Resource{\n+\t\t\t\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\t\t\t\"starttime\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeString,\n+\t\t\t\t\t\t\tOptional: true,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t\t\"keepdays\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeInt,\n+\t\t\t\t\t\t\tOptional: true,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t}},\n+\t\t\t},\n+\n+\t\t\t\"dbrtpd\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t},\n+\n+\t\t\t\"ha\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeList,\n+\t\t\t\tOptional: true,\n+\t\t\t\tMaxItems: 1,\n+\t\t\t\tElem: &schema.Resource{\n+\t\t\t\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\t\t\t\"enable\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeBool,\n+\t\t\t\t\t\t\tOptional: true,\n+\t\t\t\t\t\t},\n+\t\t\t\t\t\t\"replicationmode\": &schema.Schema{\n+\t\t\t\t\t\t\tType:     schema.TypeString,\n+\t\t\t\t\t\t\tOptional: true,\n+\t\t\t\t\t\t\tValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {\n+\t\t\t\t\t\t\t\treturn ValidateStringList(v, k, []string{\"async\", \"sync\", \"semisync\"})\n+\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t},\n+\t\t\t\t\t}},\n+\t\t\t},\n+\n+\t\t\t\"status\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"hostname\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"type\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"created\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"updated\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\t\t},\n+\t}\n+}\n+\n+func resourceInstanceDataStore(d *schema.ResourceData) instances.DataStoreOps {\n+\tvar dataStore instances.DataStoreOps\n+\tdatastoreRaw := d.Get(\"datastore\").([]interface{})\n+\tlog.Printf(\"[DEBUG] datastoreRaw: %+v\", datastoreRaw)\n+\tif len(datastoreRaw) == 1 {\n+\t\tdataStore.Type = datastoreRaw[0].(map[string]interface{})[\"type\"].(string)\n+\t\tdataStore.Version = datastoreRaw[0].(map[string]interface{})[\"version\"].(string)\n+\t}\n+\tlog.Printf(\"[DEBUG] datastore: %+v\", dataStore)\n+\treturn dataStore\n+}\n+\n+func resourceInstanceVolume(d *schema.ResourceData) instances.VolumeOps {\n+\tvar volume instances.VolumeOps\n+\tvolumeRaw := d.Get(\"volume\").([]interface{})\n+\tlog.Printf(\"[DEBUG] volumeRaw: %+v\", volumeRaw)\n+\tif len(volumeRaw) == 1 {\n+\t\tvolume.Type = volumeRaw[0].(map[string]interface{})[\"type\"].(string)\n+\t\tvolume.Size = volumeRaw[0].(map[string]interface{})[\"size\"].(int)\n+\t}\n+\tlog.Printf(\"[DEBUG] volume: %+v\", volume)\n+\treturn volume\n+}\n+\n+func resourceInstanceNics(d *schema.ResourceData) instances.NicsOps {\n+\tvar nics instances.NicsOps\n+\tnicsRaw := d.Get(\"nics\").([]interface{})\n+\tlog.Printf(\"[DEBUG] nicsRaw: %+v\", nicsRaw)\n+\tif len(nicsRaw) == 1 {\n+\t\tnics.SubnetId = nicsRaw[0].(map[string]interface{})[\"subnetid\"].(string)\n+\t}\n+\tlog.Printf(\"[DEBUG] nics: %+v\", nics)\n+\treturn nics\n+}\n+\n+func resourceInstanceSecurityGroup(d *schema.ResourceData) instances.SecurityGroupOps {\n+\tvar securityGroup instances.SecurityGroupOps\n+\tSecurityGroupRaw := d.Get(\"securitygroup\").([]interface{})\n+\tlog.Printf(\"[DEBUG] SecurityGroupOpsRaw: %+v\", SecurityGroupRaw)\n+\tif len(SecurityGroupRaw) == 1 {\n+\t\tsecurityGroup.Id = SecurityGroupRaw[0].(map[string]interface{})[\"id\"].(string)\n+\t}\n+\tlog.Printf(\"[DEBUG] securityGroup: %+v\", securityGroup)\n+\treturn securityGroup\n+\n+}\n+\n+func resourceInstanceBackupStrategy(d *schema.ResourceData) instances.BackupStrategyOps {\n+\tvar backupStrategy instances.BackupStrategyOps\n+\tbackupStrategyRaw := d.Get(\"backupstrategy\").([]interface{})\n+\tlog.Printf(\"[DEBUG] backupStrategyRaw: %+v\", backupStrategyRaw)\n+\tif len(backupStrategyRaw) == 1 {\n+\t\tbackupStrategy.StartTime = backupStrategyRaw[0].(map[string]interface{})[\"starttime\"].(string)\n+\t\tbackupStrategy.KeepDays = backupStrategyRaw[0].(map[string]interface{})[\"keepdays\"].(int)\n+\t} else {\n+\t\tbackupStrategy.StartTime = \"00:00:00\"\n+\t\tbackupStrategy.KeepDays = 0\n+\t}\n+\tlog.Printf(\"[DEBUG] backupStrategy: %+v\", backupStrategy)\n+\treturn backupStrategy\n+}\n+\n+func resourceInstanceHa(d *schema.ResourceData) instances.HaOps {\n+\tvar ha instances.HaOps\n+\thaRaw := d.Get(\"ha\").([]interface{})\n+\tlog.Printf(\"[DEBUG] haRaw: %+v\", haRaw)\n+\tif len(haRaw) == 1 {\n+\t\tha.Enable = haRaw[0].(map[string]interface{})[\"enable\"].(bool)\n+\t\tif ha.Enable == true {\n+\t\t\tha.ReplicationMode = haRaw[0].(map[string]interface{})[\"replicationmode\"].(string)\n+\t\t}\n+\t} else {\n+\t\tha.Enable = false\n+\t}\n+\tlog.Printf(\"[DEBUG] ha: %+v\", ha)\n+\treturn ha\n+}\n+\n+func InstanceStateRefreshFunc(client *golangsdk.ServiceClient, instanceID string) resource.StateRefreshFunc {\n+\treturn func() (interface{}, string, error) {\n+\t\tinstance, err := instances.Get(client, instanceID).Extract()\n+\t\tif err != nil {\n+\t\t\tif _, ok := err.(golangsdk.ErrDefault404); ok {\n+\t\t\t\treturn instance, \"DELETED\", nil\n+\t\t\t}\n+\t\t\treturn nil, \"\", err\n+\t\t}\n+\n+\t\treturn instance, instance.Status, nil\n+\t}\n+}\n+\n+func resourceInstanceCreate(d *schema.ResourceData, meta interface{}) error {\n+\tconfig := meta.(*Config)\n+\tclient, err := config.RdsV1Client(GetRegion(d, config))\n+\tif err != nil {\n+\t\treturn fmt.Errorf(\"Error creating OpenTelekomCloud rds client: %s \", err)\n+\t}\n+\n+\tcreateOpts := instances.CreateOps{\n+\t\tName:             d.Get(\"name\").(string),\n+\t\tDataStore:        resourceInstanceDataStore(d),\n+\t\tFlavorRef:        d.Get(\"flavorref\").(string),\n+\t\tVolume:           resourceInstanceVolume(d),\n+\t\tRegion:           GetRegion(d, config),\n+\t\tAvailabilityZone: d.Get(\"availabilityzone\").(string),\n+\t\tVpc:              d.Get(\"vpc\").(string),\n+\t\tNics:             resourceInstanceNics(d),\n+\t\tSecurityGroup:    resourceInstanceSecurityGroup(d),\n+\t\tDbPort:           d.Get(\"dbport\").(string),\n+\t\tBackupStrategy:   resourceInstanceBackupStrategy(d),\n+\t\tDbRtPd:           d.Get(\"dbrtpd\").(string),\n+\t\tHa:               resourceInstanceHa(d),\n+\t}\n+\tlog.Printf(\"[DEBUG] Create Options: %#v\", createOpts)\n+\n+\tinstance, err := instances.Create(client, createOpts).Extract()\n+\tif err != nil {\n+\t\treturn fmt.Errorf(\"Error getting instance from result: %s \", err)\n+\t}\n+\tlog.Printf(\"[DEBUG] Create : instance %s: %#v\", instance.ID, instance)\n+\n+\td.SetId(instance.ID)\n+\tstateConf := &resource.StateChangeConf{\n+\t\tPending:    []string{\"BUILD\"},\n+\t\tTarget:     []string{\"ACTIVE\"},\n+\t\tRefresh:    InstanceStateRefreshFunc(client, instance.ID),\n+\t\tTimeout:    d.Timeout(schema.TimeoutCreate),\n+\t\tDelay:      10 * time.Second,\n+\t\tMinTimeout: 3 * time.Second,\n+\t}\n+\n+\t_, err = stateConf.WaitForState()\n+\tif err != nil {\n+\t\treturn fmt.Errorf(\n+\t\t\t\"Error waiting for instance (%s) to become ready: %s \",\n+\t\t\tinstance.ID, err)\n+\t}\n+\n+\tif instance.ID != \"\" {\n+\t\treturn resourceInstanceRead(d, meta)\n+\t}\n+\treturn fmt.Errorf(\"Unexpected conversion error in resourceInstanceCreate. \")\n+}\n+\n+func resourceInstanceRead(d *schema.ResourceData, meta interface{}) error {\n+\tconfig := meta.(*Config)\n+\tclient, err := config.RdsV1Client(GetRegion(d, config))\n+\tif err != nil {\n+\t\treturn fmt.Errorf(\"Error creating OpenTelekomCloud rds client: %s\", err)\n+\t}\n+\n+\tinstanceID := d.Id()\n+\tinstance, err := instances.Get(client, instanceID).Extract()\n+\tif err != nil {\n+\t\treturn CheckDeleted(d, err, \"instance\")\n+\t}\n+\n+\tlog.Printf(\"[DEBUG] Retrieved instance %s: %#v\", instanceID, instance)\n+\n+\tif instance.Name != \"\" {\n+\t\tnameList := strings.Split(instance.Name, \"-\"+instance.DataStore.Type)\n+\t\tlog.Printf(\"[DEBUG] Retrieved nameList %#v\", nameList)\n+\t\tif len(nameList) > 0 {\n+\t\t\td.Set(\"name\", nameList[0])\n+\t\t}\n+\t}\n+\n+\td.Set(\"hostname\", instance.HostName)\n+\td.Set(\"type\", instance.Type)\n+\td.Set(\"region\", instance.Region)\n+\td.Set(\"availabilityzone\", instance.AvailabilityZone)\n+\td.Set(\"vpc\", instance.Vpc)\n+\td.Set(\"status\", instance.Status)\n+\n+\tnicsList := make([]map[string]interface{}, 0, 1)\n+\tnics := map[string]interface{}{\n+\t\t\"subnetid\": instance.Nics.SubnetId,\n+\t}\n+\tnicsList = append(nicsList, nics)\n+\tlog.Printf(\"[DEBUG] nicsList: %+v\", nicsList)\n+\tif err := d.Set(\"nics\", nicsList); err != nil {\n+\t\treturn fmt.Errorf(\"[DEBUG] Error saving nics to Rds instance (%s): %s\", d.Id(), err)\n+\t}\n+\n+\tsecuritygroupList := make([]map[string]interface{}, 0, 1)\n+\tsecuritygroup := map[string]interface{}{\n+\t\t\"id\": instance.SecurityGroup.Id,\n+\t}\n+\tsecuritygroupList = append(securitygroupList, securitygroup)\n+\tlog.Printf(\"[DEBUG] securitygroupList: %+v\", securitygroupList)\n+\tif err := d.Set(\"securitygroup\", securitygroupList); err != nil {\n+\t\treturn fmt.Errorf(\"[DEBUG] Error saving securitygroup to Rds instance (%s): %s\", d.Id(), err)\n+\t}\n+\n+\td.Set(\"flavorref\", instance.Flavor.Id)\n+\n+\tvolumeList := make([]map[string]interface{}, 0, 1)\n+\tvolume := map[string]interface{}{\n+\t\t\"type\": instance.Volume.Type,\n+\t\t\"size\": instance.Volume.Size,\n+\t}\n+\tvolumeList = append(volumeList, volume)\n+\tif err := d.Set(\"volume\", volumeList); err != nil {\n+\t\treturn fmt.Errorf(\n+\t\t\t\"[DEBUG] Error saving volume to Rds instance (%s): %s\", d.Id(), err)\n+\t}\n+\n+\td.Set(\"dbport\", instance.DbPort)\n+\n+\tdatastoreList := make([]map[string]interface{}, 0, 1)\n+\tdatastore := map[string]interface{}{\n+\t\t\"type\":    instance.DataStore.Type,\n+\t\t\"version\": instance.DataStore.Version,\n+\t}\n+\tdatastoreList = append(datastoreList, datastore)\n+\tif err := d.Set(\"datastore\", datastoreList); err != nil {\n+\t\treturn fmt.Errorf(\n+\t\t\t\"[DEBUG] Error saving datastore to Rds instance (%s): %s\", d.Id(), err)\n+\t}\n+\n+\t//haList := make([]map[string]interface{}, 0, 1)\n+\t//ha := map[string]interface{}{\n+\t//\t\"enable\":          instance.Ha.Enable,\n+\t//\t\"replicationmode\": instance.Ha.ReplicationMode,\n+\t//}\n+\t//haList = append(haList, ha)\n+\t//if err := d.Set(\"ha\", haList); err != nil {\n+\t//\treturn fmt.Errorf(\n+\t//\t\t\"[DEBUG] Error saving haSet to Rds instance (%s): %s\", d.Id(), err)\n+\t//}\n+\n+\td.Set(\"updated\", instance.Updated)","path":"opentelekomcloud/resource_opentelekomcloud_rds_instance_v1.go","position":451,"original_position":451,"commit_id":"c21c726c386ecb52ad4720026623850192880a7e","original_commit_id":"c21c726c386ecb52ad4720026623850192880a7e","user":{"login":"paultyng","id":422474,"avatar_url":"https://avatars1.githubusercontent.com/u/422474?v=4","gravatar_id":"","url":"https://api.github.com/users/paultyng","html_url":"https://github.com/paultyng","followers_url":"https://api.github.com/users/paultyng/followers","following_url":"https://api.github.com/users/paultyng/following{/other_user}","gists_url":"https://api.github.com/users/paultyng/gists{/gist_id}","starred_url":"https://api.github.com/users/paultyng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paultyng/subscriptions","organizations_url":"https://api.github.com/users/paultyng/orgs","repos_url":"https://api.github.com/users/paultyng/repos","events_url":"https://api.github.com/users/paultyng/events{/privacy}","received_events_url":"https://api.github.com/users/paultyng/received_events","type":"User","site_admin":false},"body":"We are trying to standardize date/time usage to the **RFC-3339** format which go supports in their [`time`](https://golang.org/pkg/time/) package. It would be nice to parse these from the API format and set them to RFC-3339 if possible, but not a requirement.","created_at":"2018-03-15T15:34:32Z","updated_at":"2018-03-15T15:41:14Z","html_url":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud/pull/15#discussion_r174827386","pull_request_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/15","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/comments/174827386"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud/pull/15#discussion_r174827386"},"pull_request":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/15","id":174850216,"html_url":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud/pull/15","diff_url":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud/pull/15.diff","patch_url":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud/pull/15.patch","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/issues/15","number":15,"state":"open","locked":false,"title":"Add rds service support","user":{"login":"freesky-edward","id":20735889,"avatar_url":"https://avatars0.githubusercontent.com/u/20735889?v=4","gravatar_id":"","url":"https://api.github.com/users/freesky-edward","html_url":"https://github.com/freesky-edward","followers_url":"https://api.github.com/users/freesky-edward/followers","following_url":"https://api.github.com/users/freesky-edward/following{/other_user}","gists_url":"https://api.github.com/users/freesky-edward/gists{/gist_id}","starred_url":"https://api.github.com/users/freesky-edward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freesky-edward/subscriptions","organizations_url":"https://api.github.com/users/freesky-edward/orgs","repos_url":"https://api.github.com/users/freesky-edward/repos","events_url":"https://api.github.com/users/freesky-edward/events{/privacy}","received_events_url":"https://api.github.com/users/freesky-edward/received_events","type":"User","site_admin":false},"body":"This PR proposes to add RDS service support, which is a db instance service on opentelekomcloud. please refer to issue #4 for more detailed information about RDS\r\n\r\n### acc results\r\n\r\n```shell\r\n==> Checking that code complies with gofmt requirements...\r\nTF_ACC=1 go test ./opentelekomcloud/ -v -run=TestAccOpenTelekomCloudRdsFlavorV1DataSource_basic -timeout 240m\r\n=== RUN   TestAccOpenTelekomCloudRdsFlavorV1DataSource_basic\r\n--- PASS: TestAccOpenTelekomCloudRdsFlavorV1DataSource_basic (165.19s)\r\n\r\n==> Checking that code complies with gofmt requirements...\r\nTF_ACC=1 go test ./opentelekomcloud/ -v -run=TestAccOpenTelekomCloudRdsFlavorV1DataSource_speccode -timeout 240m\r\n=== RUN   TestAccOpenTelekomCloudRdsFlavorV1DataSource_speccode\r\n--- PASS: TestAccOpenTelekomCloudRdsFlavorV1DataSource_speccode (31.63s)\r\n\r\n==> Checking that code complies with gofmt requirements...\r\nTF_ACC=1 go test ./opentelekomcloud/ -v -run=TestAccRDSV1Instance_basic -timeout 240m\r\n=== RUN   TestAccRDSV1Instance_basic\r\n--- PASS: TestAccRDSV1Instance_basic (687.56s)\r\n```\r\n\r\nResolves: #4 ","created_at":"2018-03-14T04:14:22Z","updated_at":"2018-03-15T15:41:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d2de76cb9aed70a19de7fc090673d9f9b4e6517","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/15/commits","review_comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/15/comments","review_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/issues/15/comments","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/statuses/c21c726c386ecb52ad4720026623850192880a7e","head":{"label":"freesky-edward:feature-rds-service","ref":"feature-rds-service","sha":"c21c726c386ecb52ad4720026623850192880a7e","user":{"login":"freesky-edward","id":20735889,"avatar_url":"https://avatars0.githubusercontent.com/u/20735889?v=4","gravatar_id":"","url":"https://api.github.com/users/freesky-edward","html_url":"https://github.com/freesky-edward","followers_url":"https://api.github.com/users/freesky-edward/followers","following_url":"https://api.github.com/users/freesky-edward/following{/other_user}","gists_url":"https://api.github.com/users/freesky-edward/gists{/gist_id}","starred_url":"https://api.github.com/users/freesky-edward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freesky-edward/subscriptions","organizations_url":"https://api.github.com/users/freesky-edward/orgs","repos_url":"https://api.github.com/users/freesky-edward/repos","events_url":"https://api.github.com/users/freesky-edward/events{/privacy}","received_events_url":"https://api.github.com/users/freesky-edward/received_events","type":"User","site_admin":false},"repo":{"id":124009621,"name":"terraform-provider-opentelekomcloud-1","full_name":"freesky-edward/terraform-provider-opentelekomcloud-1","owner":{"login":"freesky-edward","id":20735889,"avatar_url":"https://avatars0.githubusercontent.com/u/20735889?v=4","gravatar_id":"","url":"https://api.github.com/users/freesky-edward","html_url":"https://github.com/freesky-edward","followers_url":"https://api.github.com/users/freesky-edward/followers","following_url":"https://api.github.com/users/freesky-edward/following{/other_user}","gists_url":"https://api.github.com/users/freesky-edward/gists{/gist_id}","starred_url":"https://api.github.com/users/freesky-edward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freesky-edward/subscriptions","organizations_url":"https://api.github.com/users/freesky-edward/orgs","repos_url":"https://api.github.com/users/freesky-edward/repos","events_url":"https://api.github.com/users/freesky-edward/events{/privacy}","received_events_url":"https://api.github.com/users/freesky-edward/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/freesky-edward/terraform-provider-opentelekomcloud-1","description":"Terraform OpenTelekomCloud provider","fork":true,"url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1","forks_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/forks","keys_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/teams","hooks_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/hooks","issue_events_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/issues/events{/number}","events_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/events","assignees_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/assignees{/user}","branches_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/branches{/branch}","tags_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/tags","blobs_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/statuses/{sha}","languages_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/languages","stargazers_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/stargazers","contributors_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/contributors","subscribers_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/subscribers","subscription_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/subscription","commits_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/contents/{+path}","compare_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/merges","archive_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/downloads","issues_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/issues{/number}","pulls_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/pulls{/number}","milestones_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/milestones{/number}","notifications_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/labels{/name}","releases_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/releases{/id}","deployments_url":"https://api.github.com/repos/freesky-edward/terraform-provider-opentelekomcloud-1/deployments","created_at":"2018-03-06T02:38:48Z","updated_at":"2018-03-14T02:29:56Z","pushed_at":"2018-03-15T02:10:02Z","git_url":"git://github.com/freesky-edward/terraform-provider-opentelekomcloud-1.git","ssh_url":"git@github.com:freesky-edward/terraform-provider-opentelekomcloud-1.git","clone_url":"https://github.com/freesky-edward/terraform-provider-opentelekomcloud-1.git","svn_url":"https://github.com/freesky-edward/terraform-provider-opentelekomcloud-1","homepage":"https://www.terraform.io/docs/providers/opentelekomcloud/","size":8903,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"terraform-providers:master","ref":"master","sha":"11fd96d860f91db71e2a90efc394b929479cb65d","user":{"login":"terraform-providers","id":29154831,"avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"repo":{"id":113495947,"name":"terraform-provider-opentelekomcloud","full_name":"terraform-providers/terraform-provider-opentelekomcloud","owner":{"login":"terraform-providers","id":29154831,"avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud","description":"Terraform OpenTelekomCloud provider","fork":false,"url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud","forks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/forks","keys_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/teams","hooks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/hooks","issue_events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/issues/events{/number}","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/events","assignees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/assignees{/user}","branches_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/branches{/branch}","tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/tags","blobs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/statuses/{sha}","languages_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/languages","stargazers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/stargazers","contributors_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/contributors","subscribers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/subscribers","subscription_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/subscription","commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/contents/{+path}","compare_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/merges","archive_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/downloads","issues_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/issues{/number}","pulls_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls{/number}","milestones_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/milestones{/number}","notifications_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/labels{/name}","releases_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/releases{/id}","deployments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/deployments","created_at":"2017-12-07T20:36:12Z","updated_at":"2018-03-15T05:08:28Z","pushed_at":"2018-03-15T12:12:22Z","git_url":"git://github.com/terraform-providers/terraform-provider-opentelekomcloud.git","ssh_url":"git@github.com:terraform-providers/terraform-provider-opentelekomcloud.git","clone_url":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud.git","svn_url":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud","homepage":"https://www.terraform.io/docs/providers/opentelekomcloud/","size":8903,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":8,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/15"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-opentelekomcloud/pull/15"},"issue":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/issues/15"},"comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-opentelekomcloud/statuses/c21c726c386ecb52ad4720026623850192880a7e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"paultyng"}}