-
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
feat:Ability to choose default setting for Deployment Triggers for new Environments #164
feat:Ability to choose default setting for Deployment Triggers for new Environments #164
Conversation
a0c5a54
to
029f93c
Compare
a091d51
to
c070c4c
Compare
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.
Nice work, left a some comments
client/model.go
Outdated
SkipApplyWhenPlanIsEmpty bool `json:"skipApplyWhenPlanIsEmpty"` | ||
DisableDestroyEnvironments bool `json:"disableDestroyEnvironments"` | ||
SkipRedundantDeployments bool `json:"skipRedundantDeployments"` | ||
Id string `json:"id"` |
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.
We don't send the id
on the project update payload, the id
is a part of the path
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.
client/model.go
Outdated
SkipApplyWhenPlanIsEmpty bool `json:"skipApplyWhenPlanIsEmpty"` | ||
DisableDestroyEnvironments bool `json:"disableDestroyEnvironments"` | ||
SkipRedundantDeployments bool `json:"skipRedundantDeployments"` | ||
UpdatedBy string `json:"updatedBy"` |
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 here, this is a computed attribute and shouldn't be sent on payload...
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.
env0/resource_project_policy.go
Outdated
Type: schema.TypeBool, | ||
Description: "Run Terraform Plan on Pull Requests for new environments targeting their branch default value", | ||
Optional: true, | ||
Default: false, |
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 all other fields here don't have a default value setting, I think we should change it to either make all of them with default values, or none.
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.
- **continuous_deployment_default** (Boolean) Redeploy on every push to the git branch default value | ||
- **disable_destroy_environments** (Boolean) Disallow destroying environment in the project | ||
- **id** (String) id of the policy | ||
- **include_cost_estimation** (Boolean) Enable cost estimation for the project | ||
- **number_of_environments** (Number) Max number of environments a single user can have in this project, 0 indicates no limit | ||
- **number_of_environments_total** (Number) Max number of environments in this project, 0 indicates no limit | ||
- **requires_approval_default** (Boolean) Requires approval default value when creating a new environment in the project | ||
- **run_pull_request_plan_default** (Boolean) Run Terraform Plan on Pull Requests for new environments targeting their branch default value |
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 they not near each other - both of them belong trigger policy.
Plus I think id should be the first one
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.
its generated
- **continuous_deployment_default** (Boolean) Redeploy on every push to the git branch default value | ||
- **disable_destroy_environments** (Boolean) Disallow destroying environment in the project | ||
- **include_cost_estimation** (Boolean) Enable cost estimation for the project | ||
- **number_of_environments** (Number) Max number of environments a single user can have in this project, 0 indicates no limit | ||
- **number_of_environments_total** (Number) Max number of environments in this project, 0 indicates no limit | ||
- **requires_approval_default** (Boolean) Requires approval default value when creating a new environment in the project | ||
- **run_pull_request_plan_default** (Boolean) Run Terraform Plan on Pull Requests for new environments targeting their branch default value |
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. write one near to other
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.
its generated
…w Environments
Issue & Steps to Reproduce / Feature Request
Add ability to set default CD and PR plan by project policy
Solution
Add ability to set default CD and PR plan by project policy