Resource option: customTimeouts
The customTimeouts resource option provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as “5m” (5 minutes), “40s” (40 seconds), or “12h” (12 hours). Supported duration units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, and “h” (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).
For the most part, Pulumi automatically waits for operations to complete and times out appropriately. In some circumstances, such as working around bugs in the infrastructure provider, custom timeouts may be necessary.
This example specifies that the create operation should wait up to 30 minutes to complete before timing out:
let db = new Database("db", {/*...*/},
{ customTimeouts: { create: "30m" } });
let db = new Database("db", {/*...*/},
{ customTimeouts: { create: "30m" } });
db = Database('db',
opts=ResourceOptions(custom_timeouts=CustomTimeouts(create='30m')))
db, err := NewDatabase(ctx, "db", &DatabaseArgs{ /*...*/ },
pulumi.Timeouts(&pulumi.CustomTimeouts{Create: "30m"}))
var db = new Database("db", new DatabaseArgs(),
new CustomResourceOptions {
CustomTimeouts = new CustomTimeouts { Create = TimeSpan.FromMinutes(30) }
});
var db = new Database("db",
DatabaseArgs.Empty,
CustomResourceOptions.builder()
.customTimeouts(
CustomTimeouts.builder()
.create(Duration.ofMinutes(30))
.build())
.build());
resources:
db:
type: Database
options:
customTimeouts:
create: "30m"
customTimeouts resource option does not apply to component resources, and will not have the intended effect.Not all Pulumi resources support customTimeouts as support is dependent upon the particular resource’s implementation in a given provider. Most resources will print a warning when customTimeouts is not supported, e.g.:
provider:package:ResourceName (pulumi-project):
warning: Resource does not support customTimeouts, ignoring: create=30m0s
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.
