This message was deleted.
# golang
s
This message was deleted.
g
I think your
import
statements might be incorrect given the
undefined
errors. Beyond that, you shouldn't be instantiating any
*Ptr
objects. Instead you should use
ServerAzureadAdministratorArgs
directly. So your code should look like this instead:
Copy code
azureADAdministratorArgs := &mssql.ServerAzureadAdministratorArgs{
            LoginUsername: pulumi.String(azureADAdministratorInput[0].LoginUsername),
            ObjectId:      pulumi.String(azureADAdministratorInput[0].ObjectID),
            TenantId:      pulumi.StringPtr(azureADAdministratorInput[0].TenantID),
        }
e
Thanks for the info on instantiating
*Ptr
objects. I have some other objects from
mssql
like
mssql.NewElasticPool
that aren't giving that same error. I noticed that Azure SQL Servers were migrated to
mssql
from
sql
. Should I be using the old version? Here's my import statement:
Copy code
import (
	"<http://github.com/pulumi/pulumi-azure/sdk/v3/go/azure/dns|github.com/pulumi/pulumi-azure/sdk/v3/go/azure/dns>"
	"<http://github.com/pulumi/pulumi-azure/sdk/v3/go/azure/mssql|github.com/pulumi/pulumi-azure/sdk/v3/go/azure/mssql>"
	"<http://github.com/pulumi/pulumi/sdk/v2/go/pulumi|github.com/pulumi/pulumi/sdk/v2/go/pulumi>"
	"<http://github.com/pulumi/pulumi/sdk/v2/go/pulumi/config|github.com/pulumi/pulumi/sdk/v2/go/pulumi/config>"
)
I think I see what happened. My
go.mod
file had
v3.0.0
listed for
<http://github.com/pulumi/pulumi-azure/sdk/v3|github.com/pulumi/pulumi-azure/sdk/v3>
. I ran
go get <http://github.com/pulumi/pulumi-azure/sdk/v3|github.com/pulumi/pulumi-azure/sdk/v3>
and it's getting past that issue
Thanks for your help @gentle-diamond-70147!
g
You’re welcome!