-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 Resource: azurerm_cognitive_account_rai_policy
#28013
base: main
Are you sure you want to change the base?
Conversation
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 🚜
internal/services/cognitive/cognitive_account_rai_policy_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cognitive/cognitive_account_rai_policy_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cognitive/cognitive_account_rai_policy_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cognitive/cognitive_account_rai_policy_resource.go
Outdated
Show resolved
Hide resolved
sku_name = "S0" | ||
} | ||
|
||
resource "azurerm_cognitive_account_rai_policy" "test" { |
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.
custom_blocklist
is missing here?
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 custom blocklist resource is currently not supported in AzureRM. Here is a PR to add support for this resource. I will also update the test case to include the custom blocklist resource in a seperate PR once that PR got merged. This property is included here because it can be created and used with the AzAPI provider. Per that PR's discussion, should we change this property to the id of custom blocklist?
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 order in which these resources have been added is backwards then since properties that accept other resources as input should be referred to by their IDs instead of a name
string.
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.
There's no update test here?
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.
Because all the changable property are already tested in the complete test case. Also followed guidance. I will add a update test case here using complete template to update. In this case, the complete test case is no longer needed right?
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 linking the guidance @liuwuliuyun. The acceptance test section of that guide is updated, I submitted a PR to update it #28241
@@ -56,5 +56,6 @@ func (r Registration) Resources() []sdk.Resource { | |||
return []sdk.Resource{ | |||
AzureAIServicesResource{}, | |||
CognitiveDeploymentResource{}, | |||
CognitiveAccountRaiPolicyResource{}, |
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.
Alphabetical ordering, please move this to line 58
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.
Will do
|
||
* `id` - The ID of the Cognitive Service Account RAI Policy. | ||
|
||
* `type` - The type of the Cognitive Service Account RAI Policy. Possible values are `SystemManaged` or `UserManaged`. |
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.
* `type` - The type of the Cognitive Service Account RAI Policy. Possible values are `SystemManaged` or `UserManaged`. |
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.
Will remove this
* `create` - (Defaults to 30 minutes) Used when creating the Cognitive Service Account. | ||
* `update` - (Defaults to 30 minutes) Used when updating the Cognitive Service Account. | ||
* `read` - (Defaults to 5 minutes) Used when retrieving the Cognitive Service Account. | ||
* `delete` - (Defaults to 30 minutes) Used when deleting the Cognitive Service Account. |
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.
* `create` - (Defaults to 30 minutes) Used when creating the Cognitive Service Account. | |
* `update` - (Defaults to 30 minutes) Used when updating the Cognitive Service Account. | |
* `read` - (Defaults to 5 minutes) Used when retrieving the Cognitive Service Account. | |
* `delete` - (Defaults to 30 minutes) Used when deleting the Cognitive Service Account. | |
* `create` - (Defaults to 30 minutes) Used when creating the Cognitive Service Account RAI Policy. | |
* `update` - (Defaults to 30 minutes) Used when updating the Cognitive Service Account RAI Policy. | |
* `read` - (Defaults to 5 minutes) Used when retrieving the Cognitive Service Account RAI Policy. | |
* `delete` - (Defaults to 30 minutes) Used when deleting the Cognitive Service Account RAI Policy. |
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.
Will change
Co-authored-by: stephybun <[email protected]>
Dependent on #28043 going in first so |
@liuwuliuyun #28043 has gone in, can you please rebase and update your test case to include |
I have identified a design issue when including the custom_blocklist. Whether we use an ID or name, such as when the user sets This dependency causes Terraform to wait for Additionally, manually adding @stephybun, do you have any suggestions on how to resolve this? |
Community Note
Description
PR Checklist
Adding a new resource in
Cognitive
RP -azurerm_cognitive_account_rai_policy
.Testing
Note that the custom block list hasn't been integrated into the AzureRM provider yet, but it's possible to implement it using the AzAPI provider for the time being. I plan to incorporate it into the complete test case as soon as the
azurerm_cognitive_account_custom_blocklist
resource is added in the provider.Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_cognitive_account_rai_policy
[New Resource:azurerm_cognitive_account_rai_policy
#28013]This is a (please select all that apply):
Related Issue(s)
Fixes #22822