published on Thursday, Nov 19, 2026 by Pulumi
published on Thursday, Nov 19, 2026 by Pulumi
A cron schedule to run drift detection.
Create DriftSchedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DriftSchedule(name: string, args: DriftScheduleArgs, opts?: CustomResourceOptions);@overload
def DriftSchedule(resource_name: str,
args: DriftScheduleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DriftSchedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
organization: Optional[str] = None,
project: Optional[str] = None,
schedule_cron: Optional[str] = None,
stack: Optional[str] = None,
auto_remediate: Optional[bool] = None)func NewDriftSchedule(ctx *Context, name string, args DriftScheduleArgs, opts ...ResourceOption) (*DriftSchedule, error)public DriftSchedule(string name, DriftScheduleArgs args, CustomResourceOptions? opts = null)
public DriftSchedule(String name, DriftScheduleArgs args)
public DriftSchedule(String name, DriftScheduleArgs args, CustomResourceOptions options)
type: pulumiservice:DriftSchedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "pulumiservice_drift_schedule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args DriftScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DriftScheduleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DriftScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DriftScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DriftScheduleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var driftScheduleResource = new PulumiService.DriftSchedule("driftScheduleResource", new()
{
Organization = "string",
Project = "string",
ScheduleCron = "string",
Stack = "string",
AutoRemediate = false,
});
example, err := pulumiservice.NewDriftSchedule(ctx, "driftScheduleResource", &pulumiservice.DriftScheduleArgs{
Organization: pulumi.String("string"),
Project: pulumi.String("string"),
ScheduleCron: pulumi.String("string"),
Stack: pulumi.String("string"),
AutoRemediate: pulumi.Bool(false),
})
resource "pulumiservice_drift_schedule" "driftScheduleResource" {
lifecycle {
create_before_destroy = true
}
organization = "string"
project = "string"
schedule_cron = "string"
stack = "string"
auto_remediate = false
}
var driftScheduleResource = new DriftSchedule("driftScheduleResource", DriftScheduleArgs.builder()
.organization("string")
.project("string")
.scheduleCron("string")
.stack("string")
.autoRemediate(false)
.build());
drift_schedule_resource = pulumiservice.DriftSchedule("driftScheduleResource",
organization="string",
project="string",
schedule_cron="string",
stack="string",
auto_remediate=False)
const driftScheduleResource = new pulumiservice.DriftSchedule("driftScheduleResource", {
organization: "string",
project: "string",
scheduleCron: "string",
stack: "string",
autoRemediate: false,
});
type: pulumiservice:DriftSchedule
properties:
autoRemediate: false
organization: string
project: string
scheduleCron: string
stack: string
DriftSchedule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DriftSchedule resource accepts the following input properties:
- Organization string
- Organization name.
- Project string
- Project name.
- Schedule
Cron string - Cron expression for when to run drift detection.
- Stack string
- Stack name.
- Auto
Remediate bool - Whether any drift detected should be remediated after a drift run.
- Organization string
- Organization name.
- Project string
- Project name.
- Schedule
Cron string - Cron expression for when to run drift detection.
- Stack string
- Stack name.
- Auto
Remediate bool - Whether any drift detected should be remediated after a drift run.
- organization string
- Organization name.
- project string
- Project name.
- schedule_
cron string - Cron expression for when to run drift detection.
- stack string
- Stack name.
- auto_
remediate bool - Whether any drift detected should be remediated after a drift run.
- organization String
- Organization name.
- project String
- Project name.
- schedule
Cron String - Cron expression for when to run drift detection.
- stack String
- Stack name.
- auto
Remediate Boolean - Whether any drift detected should be remediated after a drift run.
- organization string
- Organization name.
- project string
- Project name.
- schedule
Cron string - Cron expression for when to run drift detection.
- stack string
- Stack name.
- auto
Remediate boolean - Whether any drift detected should be remediated after a drift run.
- organization str
- Organization name.
- project str
- Project name.
- schedule_
cron str - Cron expression for when to run drift detection.
- stack str
- Stack name.
- auto_
remediate bool - Whether any drift detected should be remediated after a drift run.
- organization String
- Organization name.
- project String
- Project name.
- schedule
Cron String - Cron expression for when to run drift detection.
- stack String
- Stack name.
- auto
Remediate Boolean - Whether any drift detected should be remediated after a drift run.
Outputs
All input properties are implicitly available as output properties. Additionally, the DriftSchedule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Schedule
Id string - Schedule ID of the created schedule, assigned by Pulumi Cloud.
- Id string
- The provider-assigned unique ID for this managed resource.
- Schedule
Id string - Schedule ID of the created schedule, assigned by Pulumi Cloud.
- id string
- The provider-assigned unique ID for this managed resource.
- schedule_
id string - Schedule ID of the created schedule, assigned by Pulumi Cloud.
- id String
- The provider-assigned unique ID for this managed resource.
- schedule
Id String - Schedule ID of the created schedule, assigned by Pulumi Cloud.
- id string
- The provider-assigned unique ID for this managed resource.
- schedule
Id string - Schedule ID of the created schedule, assigned by Pulumi Cloud.
- id str
- The provider-assigned unique ID for this managed resource.
- schedule_
id str - Schedule ID of the created schedule, assigned by Pulumi Cloud.
- id String
- The provider-assigned unique ID for this managed resource.
- schedule
Id String - Schedule ID of the created schedule, assigned by Pulumi Cloud.
Look up Existing DriftSchedule Resource
Get an existing DriftSchedule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, opts?: CustomResourceOptions): DriftSchedule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None) -> DriftSchedulefunc GetDriftSchedule(ctx *Context, name string, id IDInput, state *DriftScheduleState, opts ...ResourceOption) (*DriftSchedule, error)public static DriftSchedule Get(string name, Input<string> id, CustomResourceOptions? opts = null)public static DriftSchedule get(String name, Output<String> id, CustomResourceOptions options)resources: existingDriftSchedule: type: pulumiservice:DriftSchedule get: id: ${id}import {
to = pulumiservice_drift_schedule.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state DriftScheduleState
- Pass nil. This resource has no state arguments.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Import
This resource can be imported using its id, which has the format {organization}/{project}/{stack}/drift/{scheduleId}, e.g.,
$ pulumi import pulumiservice:index:DriftSchedule my-drift-schedule my-org/my-project/my-stack/drift/7d3c5e1a-0f8b-4b26-a9d4-3e6f2b8c1a59
The Pulumi Cloud console doesn’t show the schedule ID. List it with the Pulumi Cloud REST API:
curl -s -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
https://api.pulumi.com/api/stacks/my-org/my-project/my-stack/deployments/schedules | jq '.schedules[]'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
published on Thursday, Nov 19, 2026 by Pulumi