Thread
#aws
    s

    stocky-petabyte-29883

    2 months ago
    Hi Guys I want to read a remote file(possibly using remoteasset) and then use the file contents for creating an iam policy.
    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?
    l

    little-cartoon-10569

    2 months ago
    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.
    s

    stocky-petabyte-29883

    2 months ago
    thanks