I tried this:
bring cloud;
class WebsiteServer {
pub url: str;
new (env: Map<str>) {
// initializing some terraform and stuff....
// doing some stuff with the env.
this.url = "some terraform token";
}
}
// creating a url that allows only the server origin
let api = new cloud.Api(corsOptions:{allowOrigin: server.url});
// the website server resource needs the api.url in its environment- since it's
// essential to the initiation.
let server = new WebsiteServer({API_URL: api.url});
This happened:
I couldn't use a property url of a resource that wasn't initialized yet :(
I expected this:
to have a way to pass that
Is there a workaround?
No response
Anything else?
No response
Wing Version
0.66.5
Node.js Version
No response
Platform(s)
No response
Community Notes
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.
I tried this:
This happened:
I couldn't use a property
urlof a resource that wasn't initialized yet :(I expected this:
to have a way to pass that
Is there a workaround?
No response
Anything else?
No response
Wing Version
0.66.5
Node.js Version
No response
Platform(s)
No response
Community Notes