-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress undefined to default diffs on aws.autoscaling.Group (#4510)
Fix a regression in the import experience on aws.autoscaling.Group. Specifically the conflict between undefined and default values that `pulumi import` used to detect is no longer a conflict by automatically injecting DiffSuppressFunc for the relevant properties. Fixes #4457
- Loading branch information
Showing
5 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: regress-4457 | ||
runtime: | ||
name: python | ||
options: | ||
virtualenv: venv | ||
description: Provision a simple aws.autoscaling.Group to test importing it back | ||
config: | ||
pulumi:tags: | ||
value: | ||
pulumi:template: aws-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import pulumi | ||
import pulumi_aws as aws | ||
|
||
ami = aws.ec2.get_ami( | ||
filters=[{"name": "name", "values": ["amzn2-ami-hvm-*"]}], | ||
owners=["amazon"], | ||
most_recent=True) | ||
|
||
lt1 = aws.ec2.LaunchTemplate( | ||
"lt1", | ||
name_prefix="lt1", | ||
image_id=ami.id, | ||
instance_type="t2.micro") | ||
|
||
ag = aws.autoscaling.Group( | ||
"ag", | ||
availability_zones=["us-west-2a"], | ||
desired_capacity=1, | ||
max_size=1, | ||
min_size=1, | ||
launch_template={ | ||
"id": lt1.id, | ||
"version": "$Latest", | ||
}) | ||
|
||
# EXTRA CODE HERE | ||
|
||
pulumi.export('ami', ami.id) | ||
pulumi.export('autoGroupArn', ag.arn) | ||
pulumi.export('autoGroupUrn', ag.urn) | ||
pulumi.export('autoGroupName', ag.name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pulumi>=3.0.0,<4.0.0 | ||
pulumi-aws>=6.0.2,<7.0.0 |