-
Notifications
You must be signed in to change notification settings - Fork 14
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: add auto approve field to sub environment configuration #871
Conversation
@@ -744,6 +751,7 @@ func deploy(d *schema.ResourceData, apiClient client.ApiClientInterface) diag.Di | |||
Revision: subEnvironment.Revision, | |||
Workspace: subEnvironment.Workspace, | |||
ConfigurationChanges: configurationChanges, | |||
UserRequiresApproval: !subEnvironment.ApprovePlanAutomatically, |
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.
notice the '!'
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.
so what will happen when it is not there?
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.
the schema has a default value 'true'.
so it will be 'false'.
@@ -885,6 +893,7 @@ func getCreatePayload(d *schema.ResourceData, apiClient client.ApiClientInterfac | |||
Revision: subEnvironment.Revision, | |||
ConfigurationChanges: subEnvironment.Configuration, | |||
Workspace: subEnvironment.Workspace, | |||
UserRequiresApproval: !subEnvironment.ApprovePlanAutomatically, |
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.
notice the '!'
@@ -2437,6 +2438,7 @@ func TestUnitEnvironmentWithSubEnvironment(t *testing.T) { | |||
Revision: subEnvironment.Revision, | |||
Workspace: updatedSubEnvironment.Workspace, | |||
ConfigurationChanges: updatedSubEnvironment.Configuration, | |||
UserRequiresApproval: true, |
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.
false
for 'approve_plan_automatically' will set UserRequiresApproval
to true
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,
Please try to fix all the typos in a different PR cause most of the changes here are not related.
My apologies. |
Issue & Steps to Reproduce / Feature Request
resolves #869
Solution