Describe what happened
I'm upgrading the plugin from 5.7.0 to 6.x, and got the following error when running pulumi preview
[pf/tfbridge] Error calling EncodePropertyMap: objectEncoder failed on property "cors_headers": Expected an Object PropertyValue, found [] ("{[]}")
I have tested upgrading to 5.49.0 (with the proper corrections to code) and it worked properly at preview, haven't tested applying the change (so it would change the state) and then upgrading to 6.4.1
Sample program
import * as cloudflare from "@pulumi/cloudflare";
const accountId = "<account id>";
export const emailDomainsAllowed: string[] = ["pronom.es"];
const csaAccessPolicy = new cloudflare.ZeroTrustAccessPolicy(
"CSA-test-AccessPolicy",
{
accountId,
name: "allow email domain",
decision: "allow",
includes: emailDomainsAllowed.map((domain) => ({
emailDomain: { domain },
})),
}
);
new cloudflare.ZeroTrustAccessApplication("CSA-test", {
accountId,
type: "self_hosted",
name: "CSA test",
sessionDuration: "10h",
httpOnlyCookieAttribute: true,
policies: [{ id: csaAccessPolicy.id }],
selfHostedDomains: ["test.pronom.es"],
});
Log output
No response
Affected Resource(s)
No response
Output of pulumi about
CLI
Version 3.92.0
Go Version go1.21.3
Go Compiler gc
Plugins
NAME VERSION
cloudflare 6.4.1
nodejs unknown
Host
OS darwin
Version 15.5
Arch arm64
This project is written in nodejs: executable='/Users/marco.martins/.nvm/versions/node/v20.12.2/bin/node' version='v20.12.2'
Current Stack: organization/marco_test/dev
TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev::marco_test::pulumi:pulumi:Stack::marco_test-dev
pulumi:providers:cloudflare urn:pulumi:dev::marco_test::pulumi:providers:cloudflare::default_5_7_0
cloudflare:index/accessApplication:AccessApplication urn:pulumi:dev::marco_test::cloudflare:index/accessApplication:AccessApplication::CSA-test
cloudflare:index/accessPolicy:AccessPolicy urn:pulumi:dev::marco_test::cloudflare:index/accessPolicy:AccessPolicy::CSA-test-AccessPolicy
Found no pending operations associated with dev
Backend
Name UK06601.local
URL s3://<redacted>
User marco.martins
Organizations
Token type personal
Dependencies:
NAME VERSION
@types/node 18.19.112
typescript 5.8.3
@pulumi/cloudflare 6.4.1
@pulumi/pulumi 3.178.0
Pulumi locates its logs in /var/folders/1k/91jc9nxx5rx49nn8w5fj039c0000gp/T/ by default
Additional context
Workaround found:
pulumi stack export > stack.json
- edit stack.json and remove the line
"corsHeaders": [], from the outputs
pulumi stack import --file stack.json
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).
Describe what happened
I'm upgrading the plugin from 5.7.0 to 6.x, and got the following error when running
pulumi previewI have tested upgrading to 5.49.0 (with the proper corrections to code) and it worked properly at preview, haven't tested applying the change (so it would change the state) and then upgrading to 6.4.1
Sample program
Log output
No response
Affected Resource(s)
No response
Output of
pulumi aboutAdditional context
Workaround found:
pulumi stack export > stack.json"corsHeaders": [],from the outputspulumi stack import --file stack.jsonContributing
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).