-
Notifications
You must be signed in to change notification settings - Fork 163
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(cae/env): add new resource to manage environments #6134
base: master
Are you sure you want to change the base?
feat(cae/env): add new resource to manage environments #6134
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This PR has been approved by: @Lance52259 |
This PR needs rebase. |
f0d056a
to
9613f5c
Compare
|
9285114
to
2700823
Compare
|
71c616f
to
ffd19dc
Compare
ffd19dc
to
edcae14
Compare
|
||
Timeouts: &schema.ResourceTimeout{ | ||
Create: schema.DefaultTimeout(20 * time.Minute), | ||
Delete: schema.DefaultTimeout(20 * time.Minute), |
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.
Please add timeouts descriptions in documentation.
} | ||
createResp, err := client.Request("GET", getPath, &getOpts) | ||
if err != nil { | ||
return nil, fmt.Errorf("error query job by its ID (%s): %s", jobId, err) |
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.
return nil, fmt.Errorf("error query job by its ID (%s): %s", jobId, err) | |
return nil, fmt.Errorf("error querying job by its ID (%s): %s", jobId, err) |
return diag.Errorf("unable to find the job ID from the API response") | ||
} | ||
err = waitForEnvironmentJobComplete(ctx, client, epsId, jobId, d.Timeout(schema.TimeoutDelete), d.Get("max_retries").(int)) | ||
if err != nil { |
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.
if err != nil { | |
return diag.FromErr(err) |
What this PR does / why we need it:
Add new resource support for the environments management.
The resource supports retry when the jobs failed (during create and delete function).
Which issue this PR fixes:
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)fixes #xxx
Special notes for your reviewer:
Release note:
PR Checklist
Documentation updated.
Schema updated.
CheckDeleted.
a. During query operation (Read Context)
aa. Resource not found
b. During delete/disassociate/unbind operation (Delete Context)
ba. Resource not found