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

New Resource: azurerm_data_factory_linked_service_azure_sql_database #8349

Merged
merged 7 commits into from Sep 9, 2020

Conversation

mbfrahry
Copy link
Member

@mbfrahry mbfrahry commented Sep 4, 2020

Passing tests

--- PASS: TestAccAzureRMDataFactoryLinkedServiceAzureSQLDatabase_basic (77.67s)
--- PASS: TestAccAzureRMDataFactoryLinkedServiceAzureSQLDatabase_update (98.90s)

@ghost ghost added the size/XL label Sep 4, 2020
@ghost ghost added the documentation label Sep 4, 2020
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.

aside from a couple comments LGTM :

Comment on lines 149 to 164
secureString := datafactory.SecureString{
Value: &connectionString,
Type: datafactory.TypeSecureString,
}

sqlProperties := &datafactory.AzureSQLDatabaseLinkedServiceTypeProperties{
ConnectionString: &secureString,
}

description := d.Get("description").(string)

azureSQLDatabaseLinkedService := &datafactory.AzureSQLDatabaseLinkedService{
Description: &description,
AzureSQLDatabaseLinkedServiceTypeProperties: sqlProperties,
Type: datafactory.TypeAzureSQLDatabase,
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor and optional i'd prefer this to be

Suggested change
secureString := datafactory.SecureString{
Value: &connectionString,
Type: datafactory.TypeSecureString,
}
sqlProperties := &datafactory.AzureSQLDatabaseLinkedServiceTypeProperties{
ConnectionString: &secureString,
}
description := d.Get("description").(string)
azureSQLDatabaseLinkedService := &datafactory.AzureSQLDatabaseLinkedService{
Description: &description,
AzureSQLDatabaseLinkedServiceTypeProperties: sqlProperties,
Type: datafactory.TypeAzureSQLDatabase,
}
azureSQLDatabaseLinkedService := &datafactory.AzureSQLDatabaseLinkedService{
Description: &util.string(d.Get("description").(string)),,
AzureSQLDatabaseLinkedServiceTypeProperties: &datafactory.AzureSQLDatabaseLinkedServiceTypeProperties{
ConnectionString: &datafactory.SecureString{
Value: util.string(d.Get("connection_string").(string)),
Type: datafactory.TypeSecureString,
},
}
Type: datafactory.TypeAzureSQLDatabase,
}

Comment on lines 264 to 270
id, err := azure.ParseAzureResourceID(d.Id())
if err != nil {
return err
}
resourceGroup := id.ResourceGroup
dataFactoryName := id.Path["factories"]
name := id.Path["linkedservices"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should write a proper resource id parsing function here?

resource.TestCheckResourceAttr(data.ResourceName, "description", "test description"),
),
},
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we include an import step here?

@mbfrahry mbfrahry changed the title [WIP] New Resource: azurerm_data_factory_linked_service_azure_sql_database New Resource: azurerm_data_factory_linked_service_azure_sql_database Sep 9, 2020
@mbfrahry mbfrahry merged commit 97968fa into master Sep 9, 2020
@mbfrahry mbfrahry deleted the f-datafactory-linked-service-azure-sql-database branch September 9, 2020 02:45
mbfrahry added a commit that referenced this pull request Sep 9, 2020
@ghost
Copy link

ghost commented Sep 10, 2020

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

@ghost
Copy link

ghost commented Oct 9, 2020

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 Oct 9, 2020
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.

azurerm_data_factory_linked_service_sql_server linked SQL server issue AzureSQL
2 participants