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

azurerm_synapse_linked_service - add validation for type #19636

Merged
merged 1 commit into from
Dec 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions internal/services/synapse/synapse_linked_service_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,109 @@ func resourceSynapseLinkedService() *pluginsdk.Resource {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{
string(artifacts.TypeBasicLinkedServiceTypeAmazonMWS),
string(artifacts.TypeBasicLinkedServiceTypeAmazonRdsForOracle),
string(artifacts.TypeBasicLinkedServiceTypeAmazonRdsForSQLServer),
string(artifacts.TypeBasicLinkedServiceTypeAmazonRedshift),
string(artifacts.TypeBasicLinkedServiceTypeAmazonS3),
string(artifacts.TypeBasicLinkedServiceTypeAzureBatch),
string(artifacts.TypeBasicLinkedServiceTypeAzureBlobFS),
string(artifacts.TypeBasicLinkedServiceTypeAzureBlobStorage),
string(artifacts.TypeBasicLinkedServiceTypeAzureDataExplorer),
string(artifacts.TypeBasicLinkedServiceTypeAzureDataLakeAnalytics),
string(artifacts.TypeBasicLinkedServiceTypeAzureDataLakeStore),
string(artifacts.TypeBasicLinkedServiceTypeAzureDatabricks),
string(artifacts.TypeBasicLinkedServiceTypeAzureDatabricksDeltaLake),
string(artifacts.TypeBasicLinkedServiceTypeAzureFileStorage),
string(artifacts.TypeBasicLinkedServiceTypeAzureFunction),
string(artifacts.TypeBasicLinkedServiceTypeAzureKeyVault),
string(artifacts.TypeBasicLinkedServiceTypeAzureML),
string(artifacts.TypeBasicLinkedServiceTypeAzureMLService),
string(artifacts.TypeBasicLinkedServiceTypeAzureMariaDB),
string(artifacts.TypeBasicLinkedServiceTypeAzureMySQL),
string(artifacts.TypeBasicLinkedServiceTypeAzurePostgreSQL),
string(artifacts.TypeBasicLinkedServiceTypeAzureSQLDW),
string(artifacts.TypeBasicLinkedServiceTypeAzureSQLDatabase),
string(artifacts.TypeBasicLinkedServiceTypeAzureSQLMI),
string(artifacts.TypeBasicLinkedServiceTypeAzureSearch),
string(artifacts.TypeBasicLinkedServiceTypeAzureStorage),
string(artifacts.TypeBasicLinkedServiceTypeAzureTableStorage),
string(artifacts.TypeBasicLinkedServiceTypeCassandra),
string(artifacts.TypeBasicLinkedServiceTypeCommonDataServiceForApps),
string(artifacts.TypeBasicLinkedServiceTypeConcur),
string(artifacts.TypeBasicLinkedServiceTypeCosmosDb),
string(artifacts.TypeBasicLinkedServiceTypeCosmosDbMongoDbAPI),
string(artifacts.TypeBasicLinkedServiceTypeCouchbase),
string(artifacts.TypeBasicLinkedServiceTypeCustomDataSource),
string(artifacts.TypeBasicLinkedServiceTypeDb2),
string(artifacts.TypeBasicLinkedServiceTypeDrill),
string(artifacts.TypeBasicLinkedServiceTypeDynamics),
string(artifacts.TypeBasicLinkedServiceTypeDynamicsAX),
string(artifacts.TypeBasicLinkedServiceTypeDynamicsCrm),
string(artifacts.TypeBasicLinkedServiceTypeEloqua),
string(artifacts.TypeBasicLinkedServiceTypeFileServer),
string(artifacts.TypeBasicLinkedServiceTypeFtpServer),
string(artifacts.TypeBasicLinkedServiceTypeGoogleAdWords),
string(artifacts.TypeBasicLinkedServiceTypeGoogleBigQuery),
string(artifacts.TypeBasicLinkedServiceTypeGoogleCloudStorage),
string(artifacts.TypeBasicLinkedServiceTypeGreenplum),
string(artifacts.TypeBasicLinkedServiceTypeHBase),
string(artifacts.TypeBasicLinkedServiceTypeHDInsight),
string(artifacts.TypeBasicLinkedServiceTypeHDInsightOnDemand),
string(artifacts.TypeBasicLinkedServiceTypeHTTPServer),
string(artifacts.TypeBasicLinkedServiceTypeHdfs),
string(artifacts.TypeBasicLinkedServiceTypeHive),
string(artifacts.TypeBasicLinkedServiceTypeHubspot),
string(artifacts.TypeBasicLinkedServiceTypeImpala),
string(artifacts.TypeBasicLinkedServiceTypeInformix),
string(artifacts.TypeBasicLinkedServiceTypeJira),
string(artifacts.TypeBasicLinkedServiceTypeLinkedService),
string(artifacts.TypeBasicLinkedServiceTypeMagento),
string(artifacts.TypeBasicLinkedServiceTypeMariaDB),
string(artifacts.TypeBasicLinkedServiceTypeMarketo),
string(artifacts.TypeBasicLinkedServiceTypeMicrosoftAccess),
string(artifacts.TypeBasicLinkedServiceTypeMongoDb),
string(artifacts.TypeBasicLinkedServiceTypeMongoDbAtlas),
string(artifacts.TypeBasicLinkedServiceTypeMongoDbV2),
string(artifacts.TypeBasicLinkedServiceTypeMySQL),
string(artifacts.TypeBasicLinkedServiceTypeNetezza),
string(artifacts.TypeBasicLinkedServiceTypeOData),
string(artifacts.TypeBasicLinkedServiceTypeOdbc),
string(artifacts.TypeBasicLinkedServiceTypeOffice365),
string(artifacts.TypeBasicLinkedServiceTypeOracle),
string(artifacts.TypeBasicLinkedServiceTypeOracleServiceCloud),
string(artifacts.TypeBasicLinkedServiceTypePaypal),
string(artifacts.TypeBasicLinkedServiceTypePhoenix),
string(artifacts.TypeBasicLinkedServiceTypePostgreSQL),
string(artifacts.TypeBasicLinkedServiceTypePresto),
string(artifacts.TypeBasicLinkedServiceTypeQuickBooks),
string(artifacts.TypeBasicLinkedServiceTypeResponsys),
string(artifacts.TypeBasicLinkedServiceTypeRestService),
string(artifacts.TypeBasicLinkedServiceTypeSQLServer),
string(artifacts.TypeBasicLinkedServiceTypeSalesforce),
string(artifacts.TypeBasicLinkedServiceTypeSalesforceMarketingCloud),
string(artifacts.TypeBasicLinkedServiceTypeSalesforceServiceCloud),
string(artifacts.TypeBasicLinkedServiceTypeSapBW),
string(artifacts.TypeBasicLinkedServiceTypeSapCloudForCustomer),
string(artifacts.TypeBasicLinkedServiceTypeSapEcc),
string(artifacts.TypeBasicLinkedServiceTypeSapHana),
string(artifacts.TypeBasicLinkedServiceTypeSapOpenHub),
string(artifacts.TypeBasicLinkedServiceTypeSapTable),
string(artifacts.TypeBasicLinkedServiceTypeServiceNow),
string(artifacts.TypeBasicLinkedServiceTypeSftp),
string(artifacts.TypeBasicLinkedServiceTypeSharePointOnlineList),
string(artifacts.TypeBasicLinkedServiceTypeShopify),
string(artifacts.TypeBasicLinkedServiceTypeSnowflake),
string(artifacts.TypeBasicLinkedServiceTypeSpark),
string(artifacts.TypeBasicLinkedServiceTypeSquare),
string(artifacts.TypeBasicLinkedServiceTypeSybase),
string(artifacts.TypeBasicLinkedServiceTypeTeradata),
string(artifacts.TypeBasicLinkedServiceTypeVertica),
string(artifacts.TypeBasicLinkedServiceTypeWeb),
string(artifacts.TypeBasicLinkedServiceTypeXero),
string(artifacts.TypeBasicLinkedServiceTypeZoho),
}, false),
},

"type_properties_json": {
Expand Down
10 changes: 9 additions & 1 deletion website/docs/r/synapse_linked_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ The following arguments are supported:

* `synapse_workspace_id` - (Required) The Synapse Workspace ID in which to associate the Linked Service with. Changing this forces a new Synapse Linked Service to be created.

* `type` - (Required) The type of data stores that will be connected to Synapse. For full list of supported data stores, please refer to [Azure Synapse connector](https://docs.microsoft.com/azure/data-factory/connector-overview). Changing this forces a new Synapse Linked Service to be created.
* `type` - (Required) The type of data stores that will be connected to Synapse. Valid Values include `AmazonMWS`, `AmazonRdsForOracle`, `AmazonRdsForSqlServer`, `AmazonRedshift`, `AmazonS3`, `AzureBatch`,
`AzureBlobFS`, `AzureBlobStorage`, `AzureDataExplorer`, `AzureDataLakeAnalytics`, `AzureDataLakeStore`, `AzureDatabricks`, `AzureDatabricksDeltaLake`, `AzureFileStorage`, `AzureFunction`,
`AzureKeyVault`, `AzureML`, `AzureMLService`, `AzureMariaDB`, `AzureMySql`, `AzurePostgreSql`, `AzureSqlDW`, `AzureSqlDatabase`, `AzureSqlMI`, `AzureSearch`, `AzureStorage`,
`AzureTableStorage`, `Cassandra`, `CommonDataServiceForApps`, `Concur`, `CosmosDb`, `CosmosDbMongoDbApi`, `Couchbase`, `CustomDataSource`, `Db2`, `Drill`,
`Dynamics`, `DynamicsAX`, `DynamicsCrm`, `Eloqua`, `FileServer`, `FtpServer`, `GoogleAdWords`, `GoogleBigQuery`, `GoogleCloudStorage`, `Greenplum`, `HBase`, `HDInsight`,
`HDInsightOnDemand`, `HttpServer`, `Hdfs`, `Hive`, `Hubspot`, `Impala`, `Informix`, `Jira`, `LinkedService`, `Magento`, `MariaDB`, `Marketo`, `MicrosoftAccess`, `MongoDb`,
`MongoDbAtlas`, `MongoDbV2`, `MySql`, `Netezza`, `OData`, `Odbc`, `Office365`, `Oracle`, `OracleServiceCloud`, `Paypal`, `Phoenix`, `PostgreSql`, `Presto`, `QuickBooks`,
`Responsys`, `RestService`, `SqlServer`, `Salesforce`, `SalesforceMarketingCloud`, `SalesforceServiceCloud`, `SapBW`, `SapCloudForCustomer`, `SapEcc`, `SapHana`, `SapOpenHub`,
`SapTable`, `ServiceNow`, `Sftp`, `SharePointOnlineList`, `Shopify`, `Snowflake`, `Spark`, `Square`, `Sybase`, `Teradata`, `Vertica`, `Web`, `Xero`, `Zoho`.

* `type_properties_json` - (Required) A JSON object that contains the properties of the Synapse Linked Service.

Expand Down