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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for keyvault references in azurerm_data_factory_linked_service_sftp #25770

Open
1 task done
antgustech opened this issue Apr 26, 2024 · 0 comments
Open
1 task done

Comments

@antgustech
Copy link

antgustech commented Apr 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description


resource "azurerm_data_factory_linked_service_sftp" "example" {
  name            = "terraformSftp"
  data_factory_id = azurerm_data_factory.data_factory.id

  authentication_type = "Basic"
  host                = "xxx.com"
  port                = xx
  username        = "user"
  password        = "xxx"
}

For this linked service, only password is supported. I would like to set it as a keyvault reference instead as you can do this this in the portal. It seems that _azurerm_data_factory_linked_service_azure_blob_storage already supports this: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_factory_linked_service_azure_blob_storage

Screenshot 2024-04-26 121442

If I change it to keyvault reference in the GUI portal and then run terraform again, no diff is detected either. Only if I change the password in tf and apply it, the portal will show it as password again.

Would it be possible to make it so that we can configure linked keyvault secrets here?

I did try and use azurerm_key_vault_secret resource to download the secret and then set that as password. It works, but then the secret is stored in the state file and it is effectivly not really "linked".

New or Affected Resource(s)/Data Source(s)

azurerm_data_factory_linked_service_sftp

Potential Terraform Configuration

resource "azurerm_data_factory_linked_service_sftp" "example" {
  name            = "terraformSftp"
  data_factory_id = azurerm_data_factory.data_factory.id

  authentication_type = "Basic"
  host                = "xxx.com"
  port                = xx
  username            = "user"
  
   linked_key_vault_key {
    linked_service_name = azurerm_data_factory_linked_service_key_vault.example.name
    secret_name         = "this-is-a-kv-secret"
  } 
}

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants