Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add restart policy and version consistency parameters #193

Conversation

ia9
Copy link
Contributor

@ia9 ia9 commented Feb 28, 2025

what

  • Add restartPolicy parameter
  • Add versionConsistency parameter
  • Update docs
  • Update complete example

why

In order to support new parameters added to container definition.

  • restartPolicy parameter
  • versionConsistency parameter added in AWS provider v5.77.0

references

@ia9 ia9 requested review from a team as code owners February 28, 2025 16:36
@ia9 ia9 requested review from hans-d and gberenice February 28, 2025 16:36
@mergify mergify bot added the triage Needs triage label Feb 28, 2025
@ia9
Copy link
Contributor Author

ia9 commented Feb 28, 2025

Supersedes #192 since that PR seems to have gone stale

@gberenice
Copy link

/terratest

@gberenice
Copy link

@ia9 thanks for your contribution!
Mind checking these test results?

 Error:      	Not equal: 
        	     expected: "map[cpu:256 environment:[map[name:false_boolean_var value:false] map[name:integer_var value:42] map[name:string_var value:I am a string] map[name:true_boolean_var value:true]] essential:true extraHosts:[map[hostname:app.local ipAddress:127.0.0.1]] hostname:hostname image:cloudposse/geodesic interactive:true logConfiguration:map[logDriver:json-file options:map[max-file:3 max-size:10m]] memory:256 memoryReservation:128 name:app portMappings:[map[appProtocol:http containerPort:8080 hostPort:80 name:http protocol:tcp] map[appProtocol:http containerPort:8081 hostPort:443 name:https protocol:udp]] privileged:false pseudoTerminal:true readonlyRootFilesystem:false restartPolicy:map[enabled:true ignoredExitCodes:[0] restartAttemptPeriod:<nil>] versionConsistency:enabled]"
        	     actual  : "map[cpu:256 environment:[map[name:false_boolean_var value:false] map[name:integer_var value:42] map[name:string_var value:I am a string] map[name:true_boolean_var value:true]] essential:true extraHosts:[map[hostname:app.local ipAddress:127.0.0.1]] hostname:hostname image:cloudposse/geodesic interactive:true logConfiguration:map[logDriver:json-file options:map[max-file:3 max-size:10m]] memory:256 memoryReservation:128 name:app portMappings:[map[appProtocol:http containerPort:8080 hostPort:80 name:http protocol:tcp] map[appProtocol:http containerPort:8081 hostPort:443 name:https protocol:udp]] privileged:false pseudoTerminal:true readonlyRootFilesystem:false restartPolicy:map[enabled:true ignoredExitCodes:[0]] versionConsistency:enabled]"
        	     
        	     Diff:
        	     --- Expected
        	     +++ Actual
        	     @@ -1 +1 @@
        	     -map[cpu:256 environment:[map[name:false_boolean_var value:false] map[name:integer_var value:42] map[name:string_var value:I am a string] map[name:true_boolean_var value:true]] essential:true extraHosts:[map[hostname:app.local ipAddress:127.0.0.1]] hostname:hostname image:cloudposse/geodesic interactive:true logConfiguration:map[logDriver:json-file options:map[max-file:3 max-size:10m]] memory:256 memoryReservation:128 name:app portMappings:[map[appProtocol:http containerPort:8080 hostPort:80 name:http protocol:tcp] map[appProtocol:http containerPort:8081 hostPort:443 name:https protocol:udp]] privileged:false pseudoTerminal:true readonlyRootFilesystem:false restartPolicy:map[enabled:true ignoredExitCodes:[0] restartAttemptPeriod:<nil>] versionConsistency:enabled]
        	     +map[cpu:256 environment:[map[name:false_boolean_var value:false] map[name:integer_var value:42] map[name:string_var value:I am a string] map[name:true_boolean_var value:true]] essential:true extraHosts:[map[hostname:app.local ipAddress:127.0.0.1]] hostname:hostname image:cloudposse/geodesic interactive:true logConfiguration:map[logDriver:json-file options:map[max-file:3 max-size:10m]] memory:256 memoryReservation:128 name:app portMappings:[map[appProtocol:http containerPort:8080 hostPort:80 name:http protocol:tcp] map[appProtocol:http containerPort:8081 hostPort:443 name:https protocol:udp]] privileged:false pseudoTerminal:true readonlyRootFilesystem:false restartPolicy:map[enabled:true ignoredExitCodes:[0]] versionConsistency:enabled]
 Test:       	TestExamplesComplete

@gberenice
Copy link

/terratest

@ia9
Copy link
Contributor Author

ia9 commented Feb 28, 2025

@gberenice Let me know if there's anything else needed here

Copy link

@gberenice gberenice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gberenice gberenice merged commit dc9c21a into cloudposse:main Feb 28, 2025
21 checks passed
@mergify mergify bot removed the triage Needs triage label Feb 28, 2025
Copy link
Contributor

These changes were released in v0.61.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RestartPolicy to container definition
2 participants