-
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
azurerm_data_factory_linked_service_azure_sql_database
- adding credential
block
#27629
azurerm_data_factory_linked_service_azure_sql_database
- adding credential
block
#27629
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephybun thanks for the feedback 🙂 I've made the changes you requested.
@@ -352,6 +365,10 @@ func resourceDataFactoryLinkedServiceAzureSQLDatabaseRead(d *pluginsdk.ResourceD | |||
} | |||
} | |||
|
|||
if credential := sql.Credential; credential != nil { | |||
d.Set("credential_name", pointer.From(sql.Credential.ReferenceName)) |
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.
d.Set("credential_name", pointer.From(sql.Credential.ReferenceName)) | |
d.Set("credential_name", pointer.From(credential.ReferenceName)) |
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.
Good catch, thank you. Fix pushed.
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.
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
credential
block attribute toazurerm_data_factory_linked_service_azure_sql_database
in 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 thecredential
property [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.