Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
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})`);
}
}
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;
}
}
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);
}
uniqueImageName.apply(d =>
pulumi.log.debug(` already built: ${imageName} (${d})`, logResource));
}
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);
}
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);
}
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);
}
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);
}
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);
}