BackupSchedule

class BackupSchedule : KotlinCustomResource

A backup schedule for a Cloud Firestore Database. This resource is owned by the database it is backing up, and is deleted along with the database. The actual backups are not though. To get more information about BackupSchedule, see:

Warning: This resource creates a Firestore Backup Schedule on a project that already has a Firestore database. This resource is owned by the database it is backing up, and is deleted along with the database. The actual backups are not though.

Example Usage

Firestore Backup Schedule Daily

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firestore.BackupSchedule;
import com.pulumi.gcp.firestore.BackupScheduleArgs;
import com.pulumi.gcp.firestore.inputs.BackupScheduleDailyRecurrenceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var daily_backup = new BackupSchedule("daily-backup", BackupScheduleArgs.builder()
.dailyRecurrence()
.project("my-project-name")
.retention("604800s")
.build());
}
}

Firestore Backup Schedule Weekly

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firestore.BackupSchedule;
import com.pulumi.gcp.firestore.BackupScheduleArgs;
import com.pulumi.gcp.firestore.inputs.BackupScheduleWeeklyRecurrenceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var weekly_backup = new BackupSchedule("weekly-backup", BackupScheduleArgs.builder()
.database("(default)")
.project("my-project-name")
.retention("8467200s")
.weeklyRecurrence(BackupScheduleWeeklyRecurrenceArgs.builder()
.day("SUNDAY")
.build())
.build());
}
}

Import

BackupSchedule can be imported using any of these accepted formats* projects/{{project}}/databases/{{database}}/backupSchedules/{{name}} * {{project}}/{{database}}/{{name}} * {{database}}/{{name}} In Terraform v1.5.0 and later, use an import block to import BackupSchedule using one of the formats above. For exampletf import { id = "projects/{{project}}/databases/{{database}}/backupSchedules/{{name}}" to = google_firestore_backup_schedule.default }

$ pulumi import gcp:firestore/backupSchedule:BackupSchedule When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), BackupSchedule can be imported using one of the formats above. For example
$ pulumi import gcp:firestore/backupSchedule:BackupSchedule default projects/{{project}}/databases/{{database}}/backupSchedules/{{name}}
$ pulumi import gcp:firestore/backupSchedule:BackupSchedule default {{project}}/{{database}}/{{name}}
$ pulumi import gcp:firestore/backupSchedule:BackupSchedule default {{database}}/{{name}}

Properties

Link copied to clipboard

For a schedule that runs daily at a specified time.

Link copied to clipboard
val database: Output<String>?

The Firestore database id. Defaults to "(default)".

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The unique backup schedule identifier across all locations and databases for the given project. Format: `projects/{{project}}/databases/{{database}}/backupSchedules/{{backupSchedule}}

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val retention: Output<String>

At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". For a daily backup recurrence, set this to a value up to 7 days. If you set a weekly backup recurrence, set this to a value up to 14 weeks.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

For a schedule that runs weekly on a specific day and time. Structure is documented below.