feat(cloudformation): provision AWS::Batch::* resources + tfacc#1990
Merged
Conversation
Add a CloudFormation provisioner for AWS::Batch::ComputeEnvironment, AWS::Batch::JobQueue, and AWS::Batch::JobDefinition. The provisioner writes records directly into the batch service control plane and registers a cfn_snapshot_hooks entry so the resources survive a restart in persistent mode (the #1766 write-through lesson). Delete matches the stored record by its *Arn field so hyphenated names round-trip. Wire the terraform-provider-aws Batch acceptance suite (TestAccBatch{ComputeEnvironment,JobQueue,JobDefinition}_basic) as a new tfacc service + shard, with AWS_ENDPOINT_URL_BATCH routing. Add CFN e2e (stack creates CE/JQ/JD, delete removes them) + a restart-persistence e2e, and update the Batch docs page.
…rrays on JD The terraform-provider-aws Batch acceptance suite reads these back: - DescribeComputeEnvironments now reports ecsClusterArn (every managed/ unmanaged CE is backed by an ECS cluster; the provider asserts it set). - RegisterJobDefinition defaults the optional containerProperties list members (environment/mountPoints/resourceRequirements/secrets/ulimits/ volumes) to empty arrays, matching what AWS echoes on describe, so the provider's container_properties round-trips exactly.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final batch of the AWS Batch service: CloudFormation provisioning + terraform-provider-aws acceptance coverage.
What
AWS::Batch::ComputeEnvironment,AWS::Batch::JobQueue,AWS::Batch::JobDefinition. Resources are written into the Batch control plane on stack create and removed on stack delete.cfn_snapshot_hooksentry forbatch, so CFN-provisioned resources survive a restart in persistent mode (the CloudFormation-provisioned resources are not persisted and vanish on restart (persistent mode) #1766 write-through lesson). Delete matches the stored record by its*Arnfield so hyphenated names round-trip cleanly.batchservice + shard runningTestAccBatch(ComputeEnvironment|JobQueue|JobDefinition)_basic, withAWS_ENDPOINT_URL_BATCHrouting.Verification
cargo build --bin fakecloudcleancargo clippy -p fakecloud-cloudformation -p fakecloud-tfacccleancfn_provisions_batch_resources+cfn_provisioned_batch_survives_restartpassSummary by cubic
Adds CloudFormation support for
AWS::Batch::ComputeEnvironment,AWS::Batch::JobQueue, andAWS::Batch::JobDefinition. Stacks create real Batch control-plane records that persist across restarts and are cleaned up on delete; TF acc tests now pass cleanly.New Features
cfn_snapshot_hooksentry forbatch(restart-safe).*Arnso hyphenated names round-trip cleanly.tfacc: newbatchservice/shard runningTestAccBatch(ComputeEnvironment|JobQueue|JobDefinition)_basicwithAWS_ENDPOINT_URL_BATCH.Bug Fixes
ecsClusterArnon describe.containerPropertieslists (environment, mountPoints, resourceRequirements, secrets, ulimits, volumes) to empty arrays.Written for commit ebc8dbf. Summary will update on new commits.