provider/heroku: Prefer struct for required attrs

This commit is contained in:
Justin Campbell 2017-05-01 10:19:44 -04:00
parent ccb1b7ebec
commit 3a87ca4a43
2 changed files with 8 additions and 6 deletions

View File

@ -28,8 +28,9 @@ func resourceHerokuPipeline() *schema.Resource {
func resourceHerokuPipelineCreate(d *schema.ResourceData, meta interface{}) error {
client := meta.(*heroku.Service)
opts := heroku.PipelineCreateOpts{}
opts.Name = d.Get("name").(string)
opts := heroku.PipelineCreateOpts{
Name: d.Get("name").(string),
}
log.Printf("[DEBUG] Pipeline create configuration: %#v", opts)

View File

@ -40,10 +40,11 @@ func resourceHerokuPipelineCoupling() *schema.Resource {
func resourceHerokuPipelineCouplingCreate(d *schema.ResourceData, meta interface{}) error {
client := meta.(*heroku.Service)
opts := heroku.PipelineCouplingCreateOpts{}
opts.App = d.Get("app").(string)
opts.Pipeline = d.Get("pipeline").(string)
opts.Stage = d.Get("stage").(string)
opts := heroku.PipelineCouplingCreateOpts{
App: d.Get("app").(string),
Pipeline: d.Get("pipeline").(string),
Stage: d.Get("stage").(string),
}
log.Printf("[DEBUG] PipelineCoupling create configuration: %#v", opts)