Skip to content

Commit

Permalink
Merge pull request #681 from pulumi/use-correct-getami
Browse files Browse the repository at this point in the history
Use aws.ec2.getAmi() instead of aws.getAmi()
  • Loading branch information
pierskarsenbarg committed Jun 25, 2021
2 parents 78bd699 + 067c06b commit 5481dbe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
## HEAD (Unreleased)
* Add support for Billing CloudWatch metrics and alarms
* Add support for ECS Service Circuit Breaker and Execute Command
* Use `aws.ec2.getAmi()` instead of deprecated `aws.getAmi()`

## 0.30.0 (2021-04-19)

Expand Down
2 changes: 1 addition & 1 deletion nodejs/awsx/autoscaling/launchConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async function getEcsAmiId(name: string | undefined, opts: pulumi.InvokeOptions)
}

// Else, if a name was provided, look it up and use that imageId.
const result = await aws.getAmi({
const result = await aws.ec2.getAmi({
owners: [
"591542846629", // Amazon
],
Expand Down
2 changes: 1 addition & 1 deletion nodejs/examples/alb/ec2Instance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export = async () => {
const publicIps: pulumi.Output<string>[] = [];
const subnets = await vpc.publicSubnets;
for (let i = 0; i < subnets.length; i++) {
const getAmiResult = await aws.getAmi({
const getAmiResult = await aws.ec2.getAmi({
filters: [
{ name: "name", values: [ "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*" ] },
{ name: "virtualization-type", values: [ "hvm" ] },
Expand Down
2 changes: 1 addition & 1 deletion nodejs/examples/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const bucket = new aws.s3.Bucket("b", {
const bucketMetric = awsx.s3.metrics.firstByteLatency({ bucket, unit: "Seconds" });
const bucketAlarm = bucketMetric.createAlarm("alarm" + alarmIndex++, { threshold: 30 , evaluationPeriods: 2 }, providerOpts);

const ubuntu = pulumi.output(aws.getAmi({
const ubuntu = pulumi.output(aws.ec2.getAmi({
filters: [
{ name: "name", values: ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"] },
{ name: "virtualization-type", values: ["hvm"] },
Expand Down

0 comments on commit 5481dbe

Please sign in to comment.