Skip to content

Commit

Permalink
azurerm_synapse_linked_service - add validation for type (hashico…
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry authored and favoretti committed Jan 12, 2023
1 parent 7a0ff98 commit aa7c323
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 1 deletion.
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

0 comments on commit aa7c323

Please sign in to comment.