-
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.
Fixes errors and resource cycling issues for aws.batch.JobDefinition (#…
…3888) Recent changes in hashicorp/terraform-provider-aws#37111 introduced a Diff customizer that leads to errors in the Pulumi version of the provider due to discrepancies in the order in which Diff customizer functions are applied between Pulumi and Terraform. This change fixes the problem by applying the experimental PlanResourceChange flag to the affected resource. Fixes #3887 A regression test is included. See also: pulumi/pulumi-terraform-bridge#1785
- Loading branch information
Showing
7 changed files
with
198 additions
and
1 deletion.
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,5 @@ | ||
name: regress-3887 | ||
runtime: | ||
name: python | ||
options: | ||
virtualenv: venv |
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,55 @@ | ||
import json | ||
import pulumi_aws as aws | ||
|
||
test = aws.batch.JobDefinition( | ||
"test", | ||
name="my_test_batch_job_definition", | ||
type="container", | ||
container_properties=json.dumps( | ||
{ | ||
"command": [ | ||
"ls", | ||
"-la", | ||
], | ||
"image": "busybox", | ||
"resourceRequirements": [ | ||
{ | ||
"type": "VCPU", | ||
"value": "1", | ||
}, | ||
{ | ||
"type": "MEMORY", | ||
"value": "512", | ||
}, | ||
], | ||
"volumes": [ | ||
{ | ||
"host": { | ||
"sourcePath": "/tmp", | ||
}, | ||
"name": "tmp", | ||
} | ||
], | ||
"environment": [ | ||
{ | ||
"name": "VARNAME", | ||
"value": "VARVAL", | ||
} | ||
], | ||
"mountPoints": [ | ||
{ | ||
"sourceVolume": "tmp", | ||
"containerPath": "/tmp", | ||
"readOnly": False, | ||
} | ||
], | ||
"ulimits": [ | ||
{ | ||
"hardLimit": 1024, | ||
"name": "nofile", | ||
"softLimit": 1024, | ||
} | ||
], | ||
} | ||
), | ||
) |
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.0,<7.0.0 |
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,55 @@ | ||
import json | ||
import pulumi_aws as aws | ||
|
||
test = aws.batch.JobDefinition( | ||
"test", | ||
name="my_test_batch_job_definition", | ||
type="container", | ||
container_properties=json.dumps( | ||
{ | ||
"command": [ | ||
"ls", | ||
"-la", | ||
], | ||
"image": "busybox", | ||
"resourceRequirements": [ | ||
{ | ||
"type": "VCPU", | ||
"value": "2", | ||
}, | ||
{ | ||
"type": "MEMORY", | ||
"value": "512", | ||
}, | ||
], | ||
"volumes": [ | ||
{ | ||
"host": { | ||
"sourcePath": "/tmp", | ||
}, | ||
"name": "tmp", | ||
} | ||
], | ||
"environment": [ | ||
{ | ||
"name": "VARNAME", | ||
"value": "VARVAL", | ||
} | ||
], | ||
"mountPoints": [ | ||
{ | ||
"sourceVolume": "tmp", | ||
"containerPath": "/tmp", | ||
"readOnly": False, | ||
} | ||
], | ||
"ulimits": [ | ||
{ | ||
"hardLimit": 1024, | ||
"name": "nofile", | ||
"softLimit": 1024, | ||
} | ||
], | ||
} | ||
), | ||
) |
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,55 @@ | ||
import json | ||
import pulumi_aws as aws | ||
|
||
test = aws.batch.JobDefinition( | ||
"test", | ||
name="my_test_batch_job_definition", | ||
type="container", | ||
container_properties=json.dumps( | ||
{ | ||
"command": [ | ||
"ls", | ||
"-la", | ||
], | ||
"image": "busybox", | ||
"resourceRequirements": [ | ||
{ | ||
"type": "VCPU", | ||
"value": "3", | ||
}, | ||
{ | ||
"type": "MEMORY", | ||
"value": "512", | ||
}, | ||
], | ||
"volumes": [ | ||
{ | ||
"host": { | ||
"sourcePath": "/tmp", | ||
}, | ||
"name": "tmp", | ||
} | ||
], | ||
"environment": [ | ||
{ | ||
"name": "VARNAME", | ||
"value": "VARVAL", | ||
} | ||
], | ||
"mountPoints": [ | ||
{ | ||
"sourceVolume": "tmp", | ||
"containerPath": "/tmp", | ||
"readOnly": False, | ||
} | ||
], | ||
"ulimits": [ | ||
{ | ||
"hardLimit": 1024, | ||
"name": "nofile", | ||
"softLimit": 1024, | ||
} | ||
], | ||
} | ||
), | ||
) |