Skip to content

feat(agency): make v5 assume role duration configurable#6616

Merged
github-ci-robot merged 4 commits intohuaweicloud:masterfrom
niuzhenguo:v5agency-duration
Apr 7, 2025
Merged

feat(agency): make v5 assume role duration configurable#6616
github-ci-robot merged 4 commits intohuaweicloud:masterfrom
niuzhenguo:v5agency-duration

Conversation

@niuzhenguo
Copy link
Member

What this PR does / why we need it:

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

  • Tests added/passed.
make testacc TEST='./huaweicloud' TESTARGS='-run=TestAccSomethingV0_basic'
...
=== RUN   TestAccSomethingV0_basic
--- PASS: TestAccSomethingV0_basic (70.75s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       70.796s
  • Documentation updated.

  • Schema updated.

  • CheckDeleted.

    • a. During query operation (Read Context)
      aa. Resource not found
      >>>>>> Paste the screenshot here <<<<<<

    • b. During delete/disassociate/unbind operation (Delete Context)
      ba. Resource not found
      >>>>>> Paste the screenshot here <<<<<<

@github-ci-robot github-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2025
@github-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This PR has been approved by: @niuzhenguo

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@niuzhenguo niuzhenguo requested a review from Copilot April 7, 2025 02:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

huaweicloud/provider.go:2785

  • It appears that 'delegatedDomianName' is misspelled. Consider renaming it to 'delegatedDomainName' for clarity.
delegatedDomianName := os.Getenv("HW_ASSUME_ROLE_DOMAIN_NAME")

if delegatedDurationStr != "" {
var err error
delegatedDuration, err = strconv.Atoi(delegatedDurationStr)
if err != nil {
Copy link

Copilot AI Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When conversion of HW_ASSUME_ROLE_DURATION fails, the code logs an error and defaults to 0. Consider adding validation or a more descriptive error handling approach if 0 is not an acceptable duration.

Copilot uses AI. Check for mistakes.
@Jason-Zhang9309
Copy link
Collaborator

/lgtm

@github-ci-robot github-ci-robot added the LGTM /lgtm label Apr 7, 2025
@github-ci-robot github-ci-robot merged commit a22a790 into huaweicloud:master Apr 7, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugfix feature LGTM /lgtm size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants