Hi Guys I want to read a remote file(possibly usin...
# aws
Hi Guys I want to read a remote file(possibly using remoteasset) and then use the file contents for creating an iam policy.
Copy code
const albPolicy = new aws.iam.Policy("alb-policy", {
    name: "AWSLoadBalancerControllerIAMPolicy",
    policy: new pulumi.asset.RemoteAsset("<https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.0/docs/install/iam_policy.json>"),
    tags: {
        Environment: stack,
The code I sent doesn't work, but is there any way to achieve this?
Pulumi doesn't have a remote-file-reading feature, that's not really in Pulumi's sphere of influence. You can read the file using your language's other libraries or built-in features, then use the resulting string in the normal way.
RemoteAsset is for setting up a file on a remote machine, not for reading a file's contents.