-
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
add resource azurerm_cosmosdb_sql_trigger #11535
add resource azurerm_cosmosdb_sql_trigger #11535
Conversation
"account_name": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, | ||
ValidateFunc: validate.CosmosAccountName, | ||
}, | ||
|
||
"container_name": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, | ||
ValidateFunc: validate.CosmosEntityName, | ||
}, | ||
|
||
"database_name": { | ||
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, | ||
ValidateFunc: validate.CosmosEntityName, |
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.
we can parse this out of a resource id?
ValidateFunc: validation.StringIsNotEmpty, | ||
}, | ||
|
||
"trigger_operation": { |
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.
trigger is in the resource name?
"trigger_operation": { | |
"operation": { |
}, false), | ||
}, | ||
|
||
"trigger_type": { |
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.
"trigger_type": { | |
"type": { |
2a8cccc
to
58a5a93
Compare
@katbyte , hi, I updated this PR, could you please take another look? Thanks! |
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 @ms-henglu - one last comment and this should be good to merge
resourceGroup := containerId.ResourceGroup | ||
accountName := containerId.DatabaseAccountName | ||
containerName := containerId.ContainerName | ||
databaseName := containerId.SqlDatabaseName | ||
body := d.Get("body").(string) | ||
triggerOperation := d.Get("operation").(string) | ||
triggerType := d.Get("type").(string) | ||
|
||
id := parse.NewSqlTriggerID(subscriptionId, resourceGroup, accountName, databaseName, containerName, 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.
we don't need to assign these to an intermediate?
resourceGroup := containerId.ResourceGroup | |
accountName := containerId.DatabaseAccountName | |
containerName := containerId.ContainerName | |
databaseName := containerId.SqlDatabaseName | |
body := d.Get("body").(string) | |
triggerOperation := d.Get("operation").(string) | |
triggerType := d.Get("type").(string) | |
id := parse.NewSqlTriggerID(subscriptionId, resourceGroup, accountName, databaseName, containerName, name) | |
body := d.Get("body").(string) | |
triggerOperation := d.Get("operation").(string) | |
triggerType := d.Get("type").(string) | |
id := parse.NewSqlTriggerID(subscriptionId, containerId.ResourceGroup, containerId.AccountName, containerId.DatabaseName, containerId.Name, name) |
Options: &documentdb.CreateUpdateOptions{}, | ||
}, | ||
} | ||
future, err := client.CreateUpdateSQLTrigger(ctx, resourceGroup, accountName, databaseName, containerName, name, createUpdateSqlTriggerParameters) |
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.
same here
58a5a93
to
e7f7d45
Compare
@katbyte , thanks for code review, I updated pr according to your suggestion. |
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 @ms-henglu - LGTM 👍
This has been released in version 2.58.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.58.0"
}
# ... other configuration ... |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
The added tests are listed as follows.