-
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_kusto_cosmosdb_data_connection
#22295
Conversation
TF_ACC=1 go test -parallel 10 -v ./internal/services/kusto -run=TestAccKustoCosmosDBDataConnection_ -timeout '720m' -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc" |
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 this PR @liuwuliuyun.
I've left some comments in-line which need to be addressed. Once that's done I can proceed with my review.
Thanks!
internal/services/kusto/kusto_cosmosdb_data_connection_resource.go
Outdated
Show resolved
Hide resolved
internal/services/kusto/kusto_cosmosdb_data_connection_resource.go
Outdated
Show resolved
Hide resolved
ForceNew: true, | ||
ValidateFunc: validate.DatabaseName, | ||
}, | ||
"managed_identity_id": { |
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 this is the managed identity from the cosmosdb resource can we specify that in the name?
"managed_identity_id": { | |
"cosmosdb_managed_identity_id": { |
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.
not exactly, this identity id could be user assigned identity id or a system assigned identity id (resource id) in some cases.
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.
You could see the similar managed_identity_id in other kusto data connection resources
internal/services/kusto/kusto_cosmosdb_data_connection_resource.go
Outdated
Show resolved
Hide resolved
internal/services/kusto/kusto_cosmosdb_data_connection_resource.go
Outdated
Show resolved
Hide resolved
internal/services/kusto/kusto_cosmosdb_data_connection_resource.go
Outdated
Show resolved
Hide resolved
…e.go Co-authored-by: stephybun <[email protected]>
…e.go Co-authored-by: stephybun <[email protected]>
Finshied suggested change and here is the testing evidence.
|
internal/services/kusto/kusto_cosmosdb_data_connection_resource.go
Outdated
Show resolved
Hide resolved
internal/services/kusto/kusto_cosmosdb_data_connection_resource.go
Outdated
Show resolved
Hide resolved
|
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 @liuwuliuyun LGTM 💭
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. |
New Resource:
azurerm_kusto_cosmosdb_data_connection
Swagger
New Properties:
cluster_name
- (Required) The name of the Kusto cluster. Changing this forces a new Data Explorer to be created.cosmosdb_account_id
- (Required) The resource ID of the Cosmos DB account used to create the data connection. Changing this forces a new Data Explorer to be created.cosmosdb_container
- (Required) The name of an existing container in the Cosmos DB database. Changing this forces a new Data Explorer to be created.cosmosdb_database
- (Required) The name of an existing database in the Cosmos DB account. Changing this forces a new Data Explorer to be created.database_name
- (Required) The name of the database in the Kusto cluster. Changing this forces a new Data Explorer to be created.location
- (Required) The Azure Region where the Data Explorer should exist. Changing this forces a new Data Explorer to be created.managed_identity_id
- (Required) The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos DB. Changing this forces a new Data Explorer to be created.name
- (Required) The name of the data connection. Changing this forces a new Data Explorer to be created.resource_group_name
- (Required) The name of the Resource Group where the Data Explorer should exist. Changing this forces a new Data Explorer to be created.table_name
- (Required) The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Data Explorer to be created.mapping_rule_name
- (Optional) The name of an existing mapping rule to use when ingesting the retrieved data.retrieval_start_date
- (Optional) If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date.