azurerm_data_factory_linked_service_azure_sql_database - adding credential block#27629
azurerm_data_factory_linked_service_azure_sql_database - adding credential block#27629stephybun merged 4 commits intohashicorp:mainfrom chilledornaments:feat/adf-sql-db-credential
azurerm_data_factory_linked_service_azure_sql_database - adding credential block#27629Conversation
stephybun
left a comment
There was a problem hiding this comment.
Thanks @chilledornaments, could you take a look at the comment I left in-line?
| "credential": { | ||
| Type: pluginsdk.TypeList, | ||
| Optional: true, | ||
| MaxItems: 1, | ||
| Elem: &pluginsdk.Resource{ | ||
| Schema: map[string]*pluginsdk.Schema{ | ||
| "reference_name": { | ||
| Type: pluginsdk.TypeString, | ||
| Required: true, | ||
| ValidateFunc: validation.StringIsNotEmpty, | ||
| }, | ||
|
|
||
| "type": { | ||
| Type: pluginsdk.TypeString, | ||
| Required: true, | ||
| ValidateFunc: validation.StringIsNotEmpty, | ||
| }, | ||
| }, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
In azurerm_data_factory_integration_runtime_managed we just expose this as credential_name since type only has one valid value. To be consistent with other data factory resources can we please update this to
| "credential": { | |
| Type: pluginsdk.TypeList, | |
| Optional: true, | |
| MaxItems: 1, | |
| Elem: &pluginsdk.Resource{ | |
| Schema: map[string]*pluginsdk.Schema{ | |
| "reference_name": { | |
| Type: pluginsdk.TypeString, | |
| Required: true, | |
| ValidateFunc: validation.StringIsNotEmpty, | |
| }, | |
| "type": { | |
| Type: pluginsdk.TypeString, | |
| Required: true, | |
| ValidateFunc: validation.StringIsNotEmpty, | |
| }, | |
| }, | |
| }, | |
| }, | |
| "credential_name": { | |
| Type: pluginsdk.TypeString, | |
| Optional: true, | |
| ValidateFunc: validation.StringIsNotEmpty, | |
| }, |
There was a problem hiding this comment.
@stephybun thanks for the feedback 🙂 I've made the changes you requested.
| } | ||
|
|
||
| if credential := sql.Credential; credential != nil { | ||
| d.Set("credential_name", pointer.From(sql.Credential.ReferenceName)) |
There was a problem hiding this comment.
| d.Set("credential_name", pointer.From(sql.Credential.ReferenceName)) | |
| d.Set("credential_name", pointer.From(credential.ReferenceName)) |
There was a problem hiding this comment.
Good catch, thank you. Fix pushed.
stephybun
left a comment
There was a problem hiding this comment.
Tests look happy, thanks @chilledornaments LGTM 🍕
…edential` block (hashicorp#27629) * add credential to azurerm_data_factory_linked_service_azure_sql_database * align with msft docs * change credential block to credential_name string * fix reference
|
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. |
Community Note
Description
Adds a
credentialblock attribute toazurerm_data_factory_linked_service_azure_sql_databasein order to support User-assigned managed identity authentication. This resource currently supports the other available authentication types.PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
New test:
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_data_factory_linked_service_azure_sql_database- support for thecredentialproperty [Support for User-assigned managed identity inazurerm_data_factory_linked_service_azure_sql_database#27628]This is a (please select all that apply):
Related Issue(s)
Fixes #27628
Note
If this PR changes meaningfully during the course of review please update the title and description as required.