How to use the @pulumi/pulumi.log function in @pulumi/pulumi

To help you get started, we’ve selected a few @pulumi/pulumi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pulumi / pulumi-cloud / aws / docker.ts View on Github external
}

    console.log(
        `Building container image '${imageName}': context=${build.context}` +
            (build.dockerfile ? `, dockerfile=${build.dockerfile}` : "") +
                (build.args ? `, args=${JSON.stringify(build.args)}` : ""),
    );

    // Verify that 'docker' is on the PATH and get the client/server versions
    if (!cachedDockerVersionString) {
        try {
            const versionResult = await runCLICommand("docker", ["version", "-f", "{{json .}}"], true);
            // IDEA: In the future we could warn here on out-of-date versions of Docker which may not support key
            // features we want to use.
            cachedDockerVersionString = versionResult.stdout;
            pulumi.log.debug(`'docker version' => ${cachedDockerVersionString}`, logResource);
        } catch (err) {
            throw new RunError("No 'docker' command available on PATH: Please install to use container 'build' mode.");
        }

        // Decide whether to use --password or --password-stdin based on the client version.
        try {
            const versionData: any = JSON.parse(cachedDockerVersionString!);
            const clientVersion: string = versionData.Client.Version;
            if (semver.gte(clientVersion, "17.07.0", true)) {
                dockerPasswordStdin = true;
            }
        } catch (err) {
            console.log(`Could not process Docker version (${err})`);
        }
    }
github pulumi / pulumi-cloud / api / index.ts View on Github external
function loadFrameworkModule() {
    const frameworkModule = `@pulumi/cloud-${provider}`;
    pulumi.log.debug(`Loading ${frameworkModule} for current environment.`);
    try {
        return require(frameworkModule);
    } catch (e) {
        // If the module was not found, return a useful error message.
        if ((e instanceof Error) && (e as any).code === "MODULE_NOT_FOUND") {
            throw new RunError(`
Attempted to load the '${provider}' implementation of '@pulumi/cloud', but no '${frameworkModule}' module is installed.\
 Install it now or select another provider implementation with the "cloud:provider" setting.`,
            );
        }
        // Else, just return the error as is.
        throw e;
    }
}
github pulumi / pulumi-aws / sdk / nodejs / applicationloadbalancing / getTargetGroup.ts View on Github external
export function getTargetGroup(args?: GetTargetGroupArgs, opts?: pulumi.InvokeOptions): Promise {
    pulumi.log.warn("getTargetGroup is deprecated: aws.applicationloadbalancing.getTargetGroup has been deprecated in favor of aws.alb.getTargetGroup")
    args = args || {};
    if (!opts) {
        opts = {}
    }

    if (!opts.version) {
        opts.version = utilities.getVersion();
    }
    return pulumi.runtime.invoke("aws:applicationloadbalancing/getTargetGroup:getTargetGroup", {
        "arn": args.arn,
        "name": args.name,
        "tags": args.tags,
    }, opts);
}
github pulumi / pulumi-awsx / nodejs / aws-infra / experimental / containerDefinition.ts View on Github external
uniqueImageName.apply(d =>
            pulumi.log.debug(`    already built: ${imageName} (${d})`, logResource));
    }
github pulumi / pulumi-aws / sdk / nodejs / elasticloadbalancing / getHostedZoneId.ts View on Github external
export function getHostedZoneId(args?: GetHostedZoneIdArgs, opts?: pulumi.InvokeOptions): Promise {
    pulumi.log.warn("getHostedZoneId is deprecated: aws.elasticloadbalancing.getHostedZoneId has been deprecated in favor of aws.elb.getHostedZoneId")
    args = args || {};
    if (!opts) {
        opts = {}
    }

    if (!opts.version) {
        opts.version = utilities.getVersion();
    }
    return pulumi.runtime.invoke("aws:elasticloadbalancing/getHostedZoneId:getHostedZoneId", {
        "region": args.region,
    }, opts);
}
github pulumi / pulumi-aws / sdk / nodejs / applicationloadbalancing / getLoadBalancer.ts View on Github external
export function getLoadBalancer(args?: GetLoadBalancerArgs, opts?: pulumi.InvokeOptions): Promise {
    pulumi.log.warn("getLoadBalancer is deprecated: aws.applicationloadbalancing.getLoadBalancer has been deprecated in favor of aws.alb.getLoadBalancer")
    args = args || {};
    if (!opts) {
        opts = {}
    }

    if (!opts.version) {
        opts.version = utilities.getVersion();
    }
    return pulumi.runtime.invoke("aws:applicationloadbalancing/getLoadBalancer:getLoadBalancer", {
        "arn": args.arn,
        "name": args.name,
        "tags": args.tags,
    }, opts);
}
github pulumi / pulumi-aws / sdk / nodejs / getCanonicalUserId.ts View on Github external
export function getCanonicalUserId(opts?: pulumi.InvokeOptions): Promise {
    pulumi.log.warn("getCanonicalUserId is deprecated: aws.getCanonicalUserId has been deprecated in favor of aws.s3.getCanonicalUserId")
    if (!opts) {
        opts = {}
    }

    if (!opts.version) {
        opts.version = utilities.getVersion();
    }
    return pulumi.runtime.invoke("aws:index/getCanonicalUserId:getCanonicalUserId", {
    }, opts);
}
github pulumi / pulumi-aws / sdk / nodejs / elasticloadbalancingv2 / getTargetGroup.ts View on Github external
export function getTargetGroup(args?: GetTargetGroupArgs, opts?: pulumi.InvokeOptions): Promise {
    pulumi.log.warn("getTargetGroup is deprecated: aws.elasticloadbalancingv2.getTargetGroup has been deprecated in favor of aws.lb.getTargetGroup")
    args = args || {};
    if (!opts) {
        opts = {}
    }

    if (!opts.version) {
        opts.version = utilities.getVersion();
    }
    return pulumi.runtime.invoke("aws:elasticloadbalancingv2/getTargetGroup:getTargetGroup", {
        "arn": args.arn,
        "name": args.name,
        "tags": args.tags,
    }, opts);
}
github pulumi / pulumi-aws / sdk / nodejs / elasticloadbalancing / getLoadBalancer.ts View on Github external
export function getLoadBalancer(args: GetLoadBalancerArgs, opts?: pulumi.InvokeOptions): Promise {
    pulumi.log.warn("getLoadBalancer is deprecated: aws.elasticloadbalancing.getLoadBalancer has been deprecated in favor of aws.elb.getLoadBalancer")
    if (!opts) {
        opts = {}
    }

    if (!opts.version) {
        opts.version = utilities.getVersion();
    }
    return pulumi.runtime.invoke("aws:elasticloadbalancing/getLoadBalancer:getLoadBalancer", {
        "name": args.name,
        "tags": args.tags,
    }, opts);
}