sparse-intern-71089
12/11/2020, 1:24 AMlittle-cartoon-10569
12/11/2020, 1:24 AMinput/backup/PlanRule[]
little-cartoon-10569
12/11/2020, 1:24 AMimport {input} from "@pulumi/aws/types"
and then I can use input.backup.PlanRule
.little-cartoon-10569
12/11/2020, 1:25 AMaws.backup.PlanRule
, or...?cool-fireman-90027
12/11/2020, 2:00 PMimport * as aws from "@pulumi/aws";
const myplan = new aws.backup.Plan("shaht-backupplan", {
name: "shahtbackupplan",
rules: [{
ruleName: "tf_example_backup_rule",
targetVaultName: "Default",
schedule: "cron(0 12 * * ? *)",
}],
advancedBackupSettings: [{
backupOptions: {
WindowsVSS: "enabled",
},
resourceType: "EC2",
}],
});
export const backup_plan_name = myplan.name;
export const backup_plan_version = myplan.version;
export const backup_plan_rules = myplan.rules;
export const backup_plan_lifecycle = myplan.rules[0]["lifecycle"];
export const backup_plan_completionWindow = myplan.rules[0]["completionWindow"];
export const backup_plan_schedule = myplan.rules[0]["schedule"];
The last 3 lines seem like the what you want to get at
Here is my output of them:
backup_plan_completionWindow 180
backup_plan_lifecycle null
backup_plan_schedule cron(0 12 * * ? *)
little-cartoon-10569
12/13/2020, 8:27 PMconst rule: aws.backup.PlanRule = plan.rules[0];
little-cartoon-10569
12/13/2020, 8:29 PMaws.backup.PlanRule
, since that's where everything else is, but instead I'm having to use input.backup.PlanRule
. I just wanted to know if that's expected and I'm doing it correctly, or if there's a different (better) way to do it.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