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

SalesforceV2 being replaced with 'LinkedService' in data_factory_linked_custom_service #24610

Open
1 task done
PaulZaczkowski opened this issue Jan 23, 2024 · 4 comments
Open
1 task done

Comments

@PaulZaczkowski
Copy link

PaulZaczkowski commented Jan 23, 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.

Terraform Version

2.231.1

AzureRM Provider Version

3.88

Affected Resource(s)/Data Source(s)

azurerm_data_factory_linked_custom_service

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_data_factory" "example" {
  name                = "example"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  identity {
    type = "SystemAssigned"
  }
}

resource "azurerm_data_factory_linked_custom_service" "example" {
  name                 = "example"
  data_factory_id      = azurerm_data_factory.example.id
  type                 = "SalesforceV2"
  description          = "test description"
  type_properties_json = <<JSON
{
  "environmentUrl": "https://test.salesforce.com/",
  "clientId": "foo",
  "clientSecret": {
    "type": "SecureString",
    "value": "bar"
  }
}
JSON

}

Debug Output/Panic Output

N/A

Expected Behaviour

Linked service should be created in data factory of type "SalesforceV2" supporting the client ID/client secret. JSON would look similar to the following:

{
    "id": "<id here>",
    "name": "example",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "description": "Link to salesforce account",
        "type": "SalesforceV2",
        "typeProperties": {
            "clientId": "foo",
            "clientSecret": {
                "type": "SecureString",
                "value": "bar"
            },
            "environmentUrl": "https://test.salesforce.com/"
        }
    },
    "etag": "<etag here>"
}

Actual Behaviour

Linked service type is set to "LinkedService", and looks similar to the following:

{
    "id": "<id here>",
    "name": "example",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "description": "Link to salesforce account",
        "type": "LinkedService", 
        "typeProperties": {
            "clientId": "foo",
            "clientSecret": {
                "type": "SecureString",
                "value": "bar"
            },
            "environmentUrl": "https://test.salesforce.com/"
        }
    },
    "etag": "<etag here>"
}

Steps to Reproduce

  1. terraform apply
  2. Compare JSON on linked service

Important Factoids

No response

References

See the documentation here that states the "type" should be set to SalesforceV2.

https://learn.microsoft.com/en-us/azure/data-factory/connector-salesforce?tabs=data-factory#linked-service-properties

NOTE: I believe this issue may also affect the type of SalesforceServiceCloudV2

@PaulZaczkowski
Copy link
Author

After some digging, it looks like this might be a very recent change (~01/22/24) to include these V2 datasets/linked service connections. Instead of being a bug, this should probably be marked as a feature request. The old v1's should still work, but they show up as Legacy in ADF. For now I'm working around them by pushing with the v2 types, manually adjusting their types in the azure portal, then adding a lifecyle rule in the tf to ignore type changes.

@dmanero
Copy link

dmanero commented Feb 14, 2024

I have the same problem 8)

@Bangal22
Copy link

me too

@jwbeck97
Copy link

jwbeck97 commented Jun 3, 2024

I had a similar issue with the SnowflakeV2 linked service. For me updating the version of the azurerm provider resolved this issue.

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

5 participants