-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provider/heroku: Add resources for Heroku Pipelines #14078
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, few very minor nits. Thanks!
client := meta.(*heroku.Service) | ||
|
||
opts := heroku.PipelineCreateOpts{} | ||
opts.Name = d.Get("name").(string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a required attribute, can initialize the PipelineCreateOpts
struct with the Name
field populated:
opts := heroku.PipelineCreateOpts{
Name: d.Get("name").(string),
}
client := meta.(*heroku.Service) | ||
|
||
opts := heroku.PipelineCouplingCreateOpts{} | ||
opts.App = d.Get("app").(string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, as these are all required parameters
} | ||
|
||
if foundPipelineCoupling.ID != rs.Primary.ID { | ||
return fmt.Errorf("PipelineCoupling not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could output the difference in ID's here for clarity
} | ||
} | ||
|
||
func testAccCheckHerokuPipelineCouplingAttributes(coupling *heroku.PipelineCouplingInfoResult, _, pipelineResource, stageName string) resource.TestCheckFunc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the extra argument here?
"github.com/satori/uuid" | ||
) | ||
|
||
var validPipelineStageNames = []string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should scope this to the validator function
Also adds validators for UUID and pipeline stage names
f6b5e88
to
61f45dd
Compare
Thanks @grubernaut! I addressed each of the comments above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Adds 2 resources:
heroku_pipeline
andheroku_pipeline_coupling
to allow managing Heroku Pipelines with Terraform.Example Terraform config:
Acceptance test output: