Closed tomburge closed 3 weeks ago
After the initial stack creation and with no additional updates to code or config, there is a change to the background image, favicon, and logo when you do pulumi up. This results in a failure.
(venv) C:\repos\tom\okta\okta-pulumi>pulumi up
Previewing update (okta)
View in Browser (Ctrl+O): https://app.pulumi.com/tomburge/okta-pulumi/okta/previews/3f233456-ba2d-4ffc-b5b7-0f3b55b683c3
Type Name Plan Info
pulumi:pulumi:Stack okta-pulumi-okta
~ └─ okta:index:Theme org_theme update [diff: +backgroundImage,favicon,logo~emailTemplateTouchPointVariant,primaryColorContrastHex,primaryColorHex,secondaryColorContrastHex,secondaryColorHex]
Resources:
~ 1 to update
2 unchanged
Do you want to perform this update? yes
Updating (okta)
View in Browser (Ctrl+O): https://app.pulumi.com/tomburge/okta-pulumi/okta/updates/51
Type Name Status Info
pulumi:pulumi:Stack okta-pulumi-okta **failed** 1 error
~ └─ okta:index:Theme org_theme **updating failed** [diff: +backgroundImage,favicon,logo~emailTemplateTouchPointVariant,primaryColorContrastHex,primaryColorHex,secondaryColorContrastHex,secondaryColorHex]; 1 error
Diagnostics:
okta:index:Theme (org_theme):
error: 1 error occurred:
* updating urn:pulumi:okta::okta-pulumi::okta:index/theme:Theme::org_theme: 1 error occurred:
* failed to update theme: 400 Bad Request
pulumi:pulumi:Stack (okta-pulumi-okta):
error: update failed
Resources:
2 unchanged
Duration: 4s
(venv) C:\repos\tom\okta\okta-pulumi>pulumi up
Previewing update (okta)
View in Browser (Ctrl+O): https://app.pulumi.com/tomburge/okta-pulumi/okta/previews/0681123b-abea-4960-9b09-03344441a09e
Type Name Plan
pulumi:pulumi:Stack okta-pulumi-okta
- └─ okta:index:Theme org_theme delete
Resources:
- 1 to delete
2 unchanged
Do you want to perform this update? yes
Updating (okta)
View in Browser (Ctrl+O): https://app.pulumi.com/tomburge/okta-pulumi/okta/updates/52
Type Name Status
pulumi:pulumi:Stack okta-pulumi-okta
- └─ okta:index:Theme org_theme deleted (0.31s)
Resources:
- 1 deleted
2 unchanged
Duration: 3s
The stack shows deleted but all of the customizations in Okta are not set to the defaults. I.E. the logo, favicon, background image, etc are still there.
Hi @tomburge. I'm sorry to hear that. It looks like this boils down to a documentation error. This should be attached to class Theme
:
That explains the lack of a true create and delete semantic, as well as the weirdness for optional args.
What happened?
When I try to use Theme (https://www.pulumi.com/registry/packages/okta/api-docs/theme/) unless I put all the parameters, meaning nothing is optional, the stack creates successfully. When I try to change one parameter, Okta updates successfully but Pulumi reports an error.
Example
config:
code:
Initial stack:
Stack change:
Output of
pulumi about
Additional context
This is an Okta developer instance. The config and function work successfully the first time, but if you try to change a parameter or you create with a single parameter such as logo with the brand id and theme id then the update errors.
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).