icy-machine-99764
02/03/2023, 7:39 PMicy-machine-99764
02/03/2023, 7:39 PMconst runnerAutoScalingTarget = new aws.appautoscaling.Target(
`${solutionName}-autoscaling`,
{
minCapacity: autoScaleMinCapacity,
maxCapacity: autoScaleMaxCapacity,
resourceId: pulumi.interpolate`service/${solutionService.cluster.cluster.name}/${solutionService.service.name}`,
scalableDimension: "ecs:service:DesiredCount",
serviceNamespace: "ecs",
}
);
const runnerScaleUpPolicy = new aws.appautoscaling.Policy(
`${solutionName}-scaleup`,
{
policyType: "StepScaling",
resourceId: runnerAutoScalingTarget.id,
scalableDimension: runnerAutoScalingTarget.scalableDimension,
serviceNamespace: "ecs",
stepScalingPolicyConfiguration: {
adjustmentType: "ChangeInCapacity",
cooldown: 60,
metricAggregationType: "Maximum",
stepAdjustments: [
{
scalingAdjustment:2,
metricIntervalUpperBound:"0",
},
],
},
}
);
const runnerScaleDownPolicy = new aws.appautoscaling.Policy(
`${solutionName}-scaledown`,
{
policyType: "StepScaling",
resourceId: runnerAutoScalingTarget.id,
scalableDimension: runnerAutoScalingTarget.scalableDimension,
serviceNamespace: "ecs",
stepScalingPolicyConfiguration: {
adjustmentType: "ChangeInCapacity",
cooldown: 60,
metricAggregationType: "Maximum",
stepAdjustments: [
{
scalingAdjustment: -1,
metricIntervalUpperBound: "0",
},
],
},
}
);
new aws.cloudwatch.MetricAlarm(
`${solutionName}-high-metric`,
{
comparisonOperator: "GreaterThanOrEqualToThreshold",
evaluationPeriods: 2,
metricName: "CPUUtilization",
namespace: "AWS/ECS",
period: 60,
statistic: "Maximum",
threshold:40,
dimensions: {
ClusterName: apiCluster.cluster.name,
ServiceName: solutionService.service.name,
},
alarmDescription: "Monitors CPU utilization",
alarmActions: [runnerScaleUpPolicy.arn],
}
);
new aws.cloudwatch.MetricAlarm(
`${solutionName}-low-metric`,
{
comparisonOperator: "LessThanOrEqualToThreshold",
evaluationPeriods: 2,
metricName: "CPUUtilization",
namespace: "AWS/ECS",
period: 60,
statistic: "Maximum",
threshold: 25,
dimensions: {
ClusterName: apiCluster.cluster.name,
ServiceName: solutionService.service.name,
},
alarmDescription: "Monitors CPU utilization",
alarmActions: [runnerScaleDownPolicy.arn],
}
);
icy-machine-99764
02/03/2023, 7:39 PMicy-machine-99764
02/03/2023, 7:41 PMstrong-helmet-83704
02/03/2023, 11:54 PMpulumi preview --json
How can i get the same output from the Automation API?echoing-activity-32278
02/04/2023, 3:42 AMworried-helmet-23171
02/04/2023, 4:14 AMechoing-activity-32278
02/04/2023, 3:27 PMdef example():
stack = StackReference(f"some-stack")
# of course this fails
string_value = stack.require_output("some-output")
some-apple-41574
02/05/2023, 2:32 AMlively-controller-39972
02/05/2023, 1:36 PMbillowy-engine-58246
02/06/2023, 10:02 AMcreamy-monkey-35142
02/06/2023, 10:39 AMcool-wolf-7745
02/06/2023, 1:39 PMpulumi stack history
or pulumi stack export
? What is the correct syntax?
2. How can we rollback in Pulumi enterprise? How is it different from self-managed backend?bland-pharmacist-96854
02/06/2023, 3:05 PMprehistoric-sandwich-7272
02/06/2023, 3:58 PMwarning: resource plugin xyz is expected to have version >=0.0.23, but has 0.0.1; the wrong version may be on your path, or this may be a bug in the plugin
My suspect is that it is unable to install the pulumi plugin, and that my pluginDownloadURL
inside my schema.yaml is wrong - the issue is that I can’t find any examples online on how to do it properly...
my schema.yaml file is as follows:
# yaml-language-server: $schema=<https://raw.githubusercontent.com/pulumi/pulumi/master/pkg/codegen/schema/pulumi.json>
---
name: xyz
pluginDownloadURL: <github://api.github.com/amitOrganization/pulumi-amit-packages>
resources:
xyz:index:StaticPage:
isComponent: true
inputProperties:
indexContent:
type: string
description: The HTML content for index.html.
requiredInputs:
- indexContent
properties:
bucket:
"$ref": "/aws/v4.0.0/schema.json#/resources/aws:s3%2Fbucket:Bucket"
description: The bucket resource.
websiteUrl:
type: string
description: The website URL.
required:
- bucket
- websiteUrl
language:
go:
generateResourceContainerTypes: true
importBasePath: <http://github.com/pulumi/pulumi-xyz/sdk/go/xyz|github.com/pulumi/pulumi-xyz/sdk/go/xyz>
nodejs:
packageName: "@amitOrganization/xyz"
dependencies:
"@pulumi/aws": "^4.0.0"
devDependencies:
typescript: "^3.7.0"
cuddly-book-2159
02/06/2023, 4:04 PMbrave-angle-33257
02/06/2023, 6:19 PMwarning: This command will edit your stack's state directly. Confirm? (y/N)
plain-hydrogen-8103
02/06/2023, 9:37 PMnice-application-79035
02/07/2023, 12:10 AMazure-native
package https://www.pulumi.com/registry/packages/azure-native/api-docs/keyvault/vault/. In this API, I see that I need to provide objectId
and tenantId
. In my use case, I would have to do new application registration via pulumi from which I can get the clientId, objectID, tenantID and it's secret. Can you please point me to the API which I can call for new application registration and then another API to get objectId and tenantId which I could pass to the key vault via pulumi. Appreciate your help!delightful-monkey-90700
02/07/2023, 12:28 AMpulumi
from source (v3.54.0) and it attempts to download something as part of the build step without verifying that what it fetched was what it intended to fetch:
+ curl -OL --fail <https://github.com/pulumi/watchutil-rs/releases/download/v0.1.4/pulumi-watch-v0.1.4-x86_64-unknown-linux-gnu.tar.gz>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Couldn't connect to server
(it fails since it's part of the build step, and building is done offline)agreeable-orange-1262
02/07/2023, 10:14 AMechoing-vase-56822
02/07/2023, 11:14 AMgifted-whale-56883
02/07/2023, 11:39 AMcool-plastic-87476
02/07/2023, 1:31 PM@pulumi/pulumi/automation
package in one of our projects (using node.js). I run the following only once, when starting the server:
const stack: Stack = await LocalWorkspace.selectStack(
{
stackName: `sample-stack`,
workDir: 'sample'
},
{
envVars: {
PULUMI_ACCESS_TOKEN: process.env.PULUMI_ACCESS_TOKEN ?? '',
AWS_ACCESS_KEY_ID: process.env.AWS_ACCESS_KEY_ID ?? '',
AWS_SECRET_ACCESS_KEY: process.env.AWS_SECRET_ACCESS_KEY ?? ''
}
}
)
After this, I use the selected stack in my services and call await stack.setConfig
to set some configuration values. This all works and the configuration is showing up perfectly fine in the pulumi ui for my specific stack. Also pulumi up
runs without issues and uses the configuration as intended. However, when I redeploy my server from scratch and select the exact same stack with the code snippet above and then log await stack.getAllConfig()
the configuration returns an empty object.
I would expect the configuration that is visible in the pulumi ui, to be retrievable through this await stack.getAllConfig()
even after redeploying from scratch. It does work when I do not redeploy or restart though, but this won’t last forever 😉 Am I missing something or doing something wrong here? Or is it not a feature of this package?
Looking forward to your answers! 🙂sparse-intern-71089
02/07/2023, 3:47 PMnice-application-79035
02/07/2023, 5:36 PMazure-native
package https://www.pulumi.com/registry/packages/azure-native/api-docs/keyvault/vault/. In this API, I see that I need to provide objectId
and tenantId
. In my use case, I would have to do new application registration via pulumi from which I can get the clientId, objectID, tenantID, and its secret. Can you please point me to the pulumi python API which I can call for new application registration and then another API which I could call to get objectId and tenantId which in turn can be passed to the key vault via pulumi. Appreciate your help!flat-pager-43269
02/07/2023, 7:28 PMpulumi_command
to connect and execute a script on the machine.
The issue is that sometimes the VM is not ready and causes an unexpected result in the first lines of the script.
How can I test (in the script or using Pulumi) if the VM is ready?square-library-99709
02/07/2023, 9:49 PMorange-policeman-59119
02/07/2023, 10:13 PMquaint-market-91362
02/08/2023, 8:52 AM