Skip to content
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

data_factory_linked_service_sql_server: support key_vault_password #10032

Merged

Conversation

allantargino
Copy link
Contributor

@allantargino allantargino commented Jan 3, 2021

fixes #6481

Following the same interface introduced at #9928, where we added key_vault_password property on azurerm_data_factory_linked_service_synapse to support passwords stored in Key Vault secret through an ADF linked service, this PR adds the same capability to azurerm_data_factory_linked_service_sql_server.

The following example

resource "azurerm_data_factory_linked_service_sql_server" "test" {
  name                = "SqlServerLinkedSvc"
  resource_group_name = azurerm_resource_group.test.name
  data_factory_name   = azurerm_data_factory.test.name
  connection_string = "Integrated Security=False;Data Source=test;Initial Catalog=test;User ID=test;"
  key_vault_password {
    linked_service_name = "KeyVaultLinkedSvc"
    secret_name         = "MySecret"
  }
}

produces the following Linked Service on ADF:

{
    "name": "SqlServerLinkedSvc",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "annotations": [],
        "type": "SqlServer",
        "typeProperties": {
            "connectionString": "Integrated Security=False;Data Source=test;Initial Catalog=test;User ID=test;",
            "password": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "KeyVaultLinkedSvc",
                    "type": "LinkedServiceReference"
                },
                "secretName": "MySecret"
            }
        }
    }
}

@allantargino allantargino changed the title data_factory_linked_service_sql_server: supporting password in Key Vault data_factory_linked_service_sql_server: support password in Key Vault Jan 3, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @allantargino - one small comment i've left inline and this should be good

@allantargino
Copy link
Contributor Author

Hi @katbyte, following the refactor from #10114, I refactored this PR and solved conflicts with master.

@ghost ghost removed the waiting-response label Jan 12, 2021
@katbyte katbyte added this to the v2.43.0 milestone Jan 13, 2021
@katbyte katbyte changed the title data_factory_linked_service_sql_server: support password in Key Vault data_factory_linked_service_sql_server: support key_vault_password Jan 13, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @allantargino - LGTM 👍

@katbyte katbyte merged commit ec4743e into hashicorp:master Jan 13, 2021
katbyte added a commit that referenced this pull request Jan 13, 2021
@allantargino allantargino deleted the adf-linked-service-sql-server-key-vault branch January 13, 2021 12:27
@ghost
Copy link

ghost commented Jan 14, 2021

This has been released in version 2.43.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.43.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Feb 12, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Feb 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a keyvault feature in azure datafactory linked service
2 participants