pulumi / pulumi-pulumiservice

https://pulumi.com
Apache License 2.0
13 stars 7 forks source link

pulumiservice.TtlSchedule can be created without pulumiservice.DeploymentSettings (and subsequent `up`s will error out) #449

Open agibralter opened 8 hours ago

agibralter commented 8 hours ago

What happened?

It's possible to include a pulumiservice.TtlSchedule resource in a stack without a corresponding pulumiservice.DeploymentSettings resource. Running pulumi up with just the former will stand up the stack without any error. But then both 1) the TTL schedule will not work and 2) subsequent ups will return an error like:

Diagnostics:
  pulumiservice:index:TtlSchedule (mystack-ttl-schedule):
    error: failed to update ttl schedule e29c5797-6c39-4477-9243-35f5eea2a90e (timestamp=2024-11-22 01:47:05 +0000 UTC, deleteAfterDestroy=true): 404 API error: Not Found: ScheduledAction 'e29c5797-6c39-4477-9243-35f5eea2a90e' not found

  pulumi:pulumi:Stack (mystack):
    error: update failed

There should be better error handling and messaging.

Example

(see above)

Output of pulumi about

CLI          
Version      3.140.0
Go Version   go1.23.3
Go Compiler  gc

Plugins
KIND      NAME             VERSION
resource  aws              6.55.0
resource  awsx             2.16.1
resource  datadog          4.34.0
resource  docker           4.5.6
resource  postgresql       3.13.0
resource  pulumi_aws_tags  1.2.1
resource  pulumiservice    0.26.2
language  python           unknown
resource  rabbitmq         3.3.7
resource  random           4.16.7
resource  synced-folder    0.11.1

Host     
OS       darwin
Version  14.5
Arch     arm64

This project is written in python: executable='/Users/me/Library/Caches/pypoetry/virtualenvs/infra-jqilnyNa-py3.12/bin/python3' version='3.12.7'

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/yyy
User           yyy
Organizations  yyy, xxx
Token type     personal

Dependencies:
NAME                  VERSION
black                 24.10.0
pip                   24.2
pre_commit            4.0.1
psycopg               3.2.3
pulumi_aws_tags       1.2.1
pulumi_awsx           2.16.1
pulumi_datadog        4.34.0
pulumi_postgresql     3.13.0
pulumi_pulumiservice  0.26.2
pulumi_rabbitmq       3.3.7
pulumi_random         4.16.7
pulumi_synced_folder  0.11.1
pyright               1.1.385
ruff                  0.6.9
types-PyYAML          6.0.12.20240917

Pulumi locates its logs in /var/folders/p1/cwqtcbkn4xvdt377y9jzrb180000gn/T/ by default
warning: Failed to get information about the current stack: No current stack

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).