provider/heroku: Prefer struct for required attrs
This commit is contained in:
parent
ccb1b7ebec
commit
3a87ca4a43
|
@ -28,8 +28,9 @@ func resourceHerokuPipeline() *schema.Resource {
|
||||||
func resourceHerokuPipelineCreate(d *schema.ResourceData, meta interface{}) error {
|
func resourceHerokuPipelineCreate(d *schema.ResourceData, meta interface{}) error {
|
||||||
client := meta.(*heroku.Service)
|
client := meta.(*heroku.Service)
|
||||||
|
|
||||||
opts := heroku.PipelineCreateOpts{}
|
opts := heroku.PipelineCreateOpts{
|
||||||
opts.Name = d.Get("name").(string)
|
Name: d.Get("name").(string),
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("[DEBUG] Pipeline create configuration: %#v", opts)
|
log.Printf("[DEBUG] Pipeline create configuration: %#v", opts)
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,11 @@ func resourceHerokuPipelineCoupling() *schema.Resource {
|
||||||
func resourceHerokuPipelineCouplingCreate(d *schema.ResourceData, meta interface{}) error {
|
func resourceHerokuPipelineCouplingCreate(d *schema.ResourceData, meta interface{}) error {
|
||||||
client := meta.(*heroku.Service)
|
client := meta.(*heroku.Service)
|
||||||
|
|
||||||
opts := heroku.PipelineCouplingCreateOpts{}
|
opts := heroku.PipelineCouplingCreateOpts{
|
||||||
opts.App = d.Get("app").(string)
|
App: d.Get("app").(string),
|
||||||
opts.Pipeline = d.Get("pipeline").(string)
|
Pipeline: d.Get("pipeline").(string),
|
||||||
opts.Stage = d.Get("stage").(string)
|
Stage: d.Get("stage").(string),
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("[DEBUG] PipelineCoupling create configuration: %#v", opts)
|
log.Printf("[DEBUG] PipelineCoupling create configuration: %#v", opts)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue