-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix: env0_cost_credentials_project_assignment not working #369
Fix: env0_cost_credentials_project_assignment not working #369
Conversation
@@ -9,7 +9,9 @@ type CostCredentialProjectAssignment struct { | |||
func (client *ApiClient) AssignCostCredentialsToProject(projectId string, credentialId string) (CostCredentialProjectAssignment, error) { | |||
var result CostCredentialProjectAssignment | |||
|
|||
err := client.http.Put("/costs/project/"+projectId+"/credentials", credentialId, &result) | |||
err := client.http.Put("/costs/project/"+projectId+"/credentials", map[string]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.
body passed was incorrect.
@@ -22,7 +24,7 @@ func (client *ApiClient) RemoveCostCredentialsFromProject(projectId string, cred | |||
|
|||
func (client *ApiClient) CostCredentialIdsInProject(projectId string) ([]CostCredentialProjectAssignment, error) { | |||
var result []CostCredentialProjectAssignment | |||
err := client.http.Get("/costs/project/"+projectId, nil, &result) | |||
err := client.http.Get("/costs/project/"+projectId+"/credentials", nil, &result) |
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.
url path was incorrect.
@@ -0,0 +1,23 @@ | |||
provider "random" {} |
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.
Added an integration test to avoid issues moving forward.
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
Issue & Steps to Reproduce / Feature Request
fixes #366
Solution
The body argument was incorrect.
The URL path was incorrect.
Added an integration test.