chilly-plastic-75584
03/29/2022, 1:31 AMcannot use bp (variable of type *documentdb.PeriodicModeBackupPolicy) as pulumi.Input value in struct literal: missing method ElementTypecompilerInvalidIfaceAssign
Trying to do:
dbacct, err := documentdb.NewDatabaseAccount(ctx, "databaseAccount"+environment, &documentdb.DatabaseAccountArgs{
AccountName: pulumi.String(cfgDatabaseAcct.Name),
ApiProperties: &documentdb.ApiPropertiesArgs{
ServerVersion: pulumi.String(cfgDatabaseAcct.ServerVersion),
},
BackupPolicy: bp,
}
I defined bp
bp := &documentdb.PeriodicModeBackupPolicy{
PeriodicModeProperties: &documentdb.PeriodicModeProperties{
BackupIntervalInMinutes: &cfgDatabaseAcct.BackupIntervalInMinutes,
BackupRetentionIntervalInHours: &cfgDatabaseAcct.BackupRetentionIntervalInHours,
},
Type: cfgDatabaseAcct.BackupType,
}
I adjusted PeriodicModeProperties to be a pointer based on object definition (the autogenerated example seems wrong?).
Any ideas?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by