Conversation
We move all the OptionSettings from the template to the actual environment. This means changes to the values are picked up. The template is only consulted when a new environment is created.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Elastic Beanstalk environment CloudFormation template to introduce a dedicated AWS::ElasticBeanstalk::ConfigurationTemplate resource (EnvironmentTemplate) and updates the environment to reference it via TemplateName.
Changes:
- Added a new
EnvironmentTemplate(AWS::ElasticBeanstalk::ConfigurationTemplate) resource. - Updated the
Environmentresource to reference the new configuration template (TemplateName: !Ref EnvironmentTemplate). - Removed the previous
appConfigTemplateconfiguration template resource block (effectively a rename/restructure).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+248
to
+261
| EnvironmentTemplate: | ||
| Type: AWS::ElasticBeanstalk::ConfigurationTemplate | ||
| Properties: | ||
| ApplicationName: !Ref appName | ||
| Description: !Sub "Config template - ${appName}" | ||
| SolutionStackName: !Ref solutionStack | ||
|
|
||
| Environment: | ||
| Type: "AWS::ElasticBeanstalk::Environment" | ||
| Properties: | ||
| EnvironmentName: !Sub "${appName}-${envType}" | ||
| ApplicationName: !Ref appName | ||
| VersionLabel: !Ref ApplicationVersion | ||
| TemplateName: !Ref appConfigTemplate | ||
| TemplateName: !Ref EnvironmentTemplate |
Comment on lines
+245
to
+247
| # We use a configuration template so that at environment creation the correct solution stack is used, | ||
| # but then we can update the value supplied to the stack later and nothing changes (but the stack still deploys). | ||
| # Only when the managed updates are applied will the solution stack be updated. |
Comment on lines
+248
to
266
| EnvironmentTemplate: | ||
| Type: AWS::ElasticBeanstalk::ConfigurationTemplate | ||
| Properties: | ||
| ApplicationName: !Ref appName | ||
| Description: !Sub "Config template - ${appName}" | ||
| SolutionStackName: !Ref solutionStack | ||
|
|
||
| Environment: | ||
| Type: "AWS::ElasticBeanstalk::Environment" | ||
| Properties: | ||
| EnvironmentName: !Sub "${appName}-${envType}" | ||
| ApplicationName: !Ref appName | ||
| VersionLabel: !Ref ApplicationVersion | ||
| TemplateName: !Ref appConfigTemplate | ||
| TemplateName: !Ref EnvironmentTemplate | ||
| Tier: | ||
| Name: "WebServer" | ||
| Type: "Standard" | ||
| Version: "1.0" | ||
|
|
||
| appConfigTemplate: | ||
| Type: AWS::ElasticBeanstalk::ConfigurationTemplate | ||
| Properties: | ||
| ApplicationName: !Ref appName | ||
| SolutionStackName: !Ref solutionStack | ||
| Description: !Sub "Config template - ${appName}" | ||
| OptionSettings: |
buckett
requested review from
lardo-de-arnaud,
nicholaswilson100 and
sebastianchristopher
June 16, 2026 08:15
sebastianchristopher
approved these changes
Jun 16, 2026
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.
We move all the OptionSettings from the template to the actual environment. This means changes to the values are picked up. The template is only consulted when a new environment is created.