-
Notifications
You must be signed in to change notification settings - Fork 160
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
New acc test and update Identity agency support duration param and doc #946
New acc test and update Identity agency support duration param and doc #946
Conversation
Config: testAccIdentityAgency_basic(rName), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckIdentityAgencyExists(resourceName, &agency), | ||
resource.TestCheckResourceAttr(resourceName, "name", rName), |
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.
suggest to add more attr check
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.
now we have five attribute check in acc test.
docs/resources/identity_agency.md
Outdated
@@ -27,6 +28,25 @@ resource "huaweicloud_identity_agency" "agency" { | |||
} | |||
``` | |||
|
|||
### Delegate the operation authority of the resources in the account to Huaweicloud service |
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.
Delegate a cloud service to access your resources in other cloud services.
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.
thanks for suggestion, it's updated at document.
docs/resources/identity_agency.md
Outdated
@@ -9,6 +9,7 @@ This is an alternative to `huaweicloud_iam_agency_v3` | |||
|
|||
## Example Usage | |||
|
|||
### Delegate the operation authority of the resources in the account to other Huaweicloud accounts |
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.
Delegate another HUAWEI CLOUD account to perform operations on your resources.
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.
thanks for suggestion, it's updated at document.
docs/resources/identity_agency.md
Outdated
@@ -38,6 +58,11 @@ The following arguments are supported: | |||
agency. The value is a string of 0 to 255 characters. | |||
|
|||
* `delegated_domain_name` - (Required, String) The name of delegated domain. |
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.
can we add a new parameter named delegated_service_name
?
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.
new parameter delegated_service_name
and update param create, update and read operation in identity agency. please help reviewing code.
@@ -437,10 +459,15 @@ func resourceIAMAgencyV3Update(d *schema.ResourceData, meta interface{}) error { | |||
|
|||
agencyID := d.Id() | |||
|
|||
if d.HasChanges("delegated_domain_name", "description") { | |||
if d.HasChanges("delegated_domain_name", "description", "duration") { |
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.
should put "delegated_service_name" in the list
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.
thanks, 'delegated_service_name' is putting into the list
d.Set("description", a.Description) | ||
d.Set("duration", a.Duration) | ||
d.Set("expire_time", a.ExpireTime) | ||
d.Set("create_time", a.CreateTime) | ||
|
||
if ok, err := regexp.MatchString("^op_svc_[A-Za-z]+$", a.DelegatedDomainName); err != nil { | ||
fmt.Printf("regexp error, err= %s", 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.
did you mean log.Printf ?
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.
It's updated using fmt.Errorf return.
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.
thanks, there need log.Printf actually.
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
Acceptance Steps Performed
Delegate another HUAWEI CLOUD account to perform operations on your resources.
Delegate a cloud service to access your resources in other cloud services.