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

r/aws_elastic_beanstalk_application_version: add process argument #25468

Merged
merged 18 commits into from
Aug 26, 2024

Conversation

gmeligio
Copy link
Contributor

@gmeligio gmeligio commented Jun 18, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Context: I currently work on a project where the Beanstalk environment creation is failing because the version is not processed. I'm using the workaround: creating the version with the AWS CLI passing the --process argument and then using Terraform to create the environment. I would prefer to manage the version also inside Terraform. Instead of creating an issue, I searched for how to solve it by creating the PR.

The process=true argument is required when the Beanstalk version settings are passed through an env.yaml instead of using settings. Without this option set, in this case, Beanstalk will not find the settings when creating the environment and the creation will fail.

I added an acceptance test with positive and negative checks. Also, added the documentation from the AWS SDK for Go. Maybe the documentation can be simplified.

Here is the related documentation in AWS SDK for Go
https://github.com/aws/aws-sdk-go-v2/blob/service/elasticbeanstalk/v1.14.7/service/elasticbeanstalk/api_op_CreateApplicationVersion.go#L41

// Pre-processes and validates the environment manifest (env.yaml) and
// configuration files (*.config files in the .ebextensions folder) in the source
// bundle. Validating configuration files can identify issues prior to deploying
// the application version to an environment. You must turn processing on for
// application versions that you create using AWS CodeBuild or AWS CodeCommit. For
// application versions built from a source bundle in Amazon S3, processing is
// optional. The Process option validates Elastic Beanstalk configuration files. It
// doesn't validate your application's configuration files, like proxy server or
// Docker configuration.
Process *[bool](https://pkg.go.dev/builtin#bool)

Output from acceptance testing:

$ make testacc TESTS=TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process PKG=elasticbeanstalk
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticbeanstalk/... -v -count 1 -parallel 20 -run='TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process'  -timeout 180m
=== RUN   TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process
=== PAUSE TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process
=== CONT  TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process
--- PASS: TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process (64.09s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/elasticbeanstalk   64.152s

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. labels Jun 18, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @gmeligio 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 19, 2022
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Sep 26, 2022
@github-actions
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@github-actions
Copy link

Thank you for your contribution! 🚀

Please note that the CHANGELOG.md file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts, especially for contributions which may not be merged immediately. Please see the Contributing Guide for additional pull request review items.

Remove any changes to the CHANGELOG.md file and commit them in this pull request to prevent delays with reviewing and potentially merging this pull request.

@github-actions github-actions bot added client-connections Pertains to the AWS Client and service connections. create Pertains to generating names, hashcodes, etc. dependencies Used to indicate dependency changes. examples Introduces or discusses updates to examples. flex Pertains to FLatteners and EXpanders. generators Relates to code generators. github_actions Pull requests that update Github_actions code linter Pertains to changes to or issues with the various linters. provider Pertains to the provider itself, rather than any interaction with AWS. repository Repository modifications; GitHub Actions, developer docs, issue templates, codeowners, changelog. service/accessanalyzer Issues and PRs that pertain to the accessanalyzer service. service/account Issues and PRs that pertain to the account service. service/acm Issues and PRs that pertain to the acm service. service/acmpca Issues and PRs that pertain to the acmpca service. service/amp Issues and PRs that pertain to the amp service. service/amplify Issues and PRs that pertain to the amplify service. service/apigateway Issues and PRs that pertain to the apigateway service. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. labels Sep 26, 2022
@github-actions github-actions bot removed service/cloudcontrol Issues and PRs that pertain to the cloudcontrol service. service/appmesh Issues and PRs that pertain to the appmesh service. labels Sep 26, 2022
@gmeligio gmeligio marked this pull request as ready for review September 26, 2022 11:27
@ewbankkit ewbankkit requested a review from a team as a code owner August 26, 2024 16:42
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccElasticBeanstalk' PKG=elasticbeanstalk ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/elasticbeanstalk/... -v -count 1 -parallel 3  -run=TestAccElasticBeanstalk -timeout 720m
=== RUN   TestAccElasticBeanstalkApplicationDataSource_basic
=== PAUSE TestAccElasticBeanstalkApplicationDataSource_basic
=== RUN   TestAccElasticBeanstalkApplication_basic
=== PAUSE TestAccElasticBeanstalkApplication_basic
=== RUN   TestAccElasticBeanstalkApplication_disappears
=== PAUSE TestAccElasticBeanstalkApplication_disappears
=== RUN   TestAccElasticBeanstalkApplication_tags
=== PAUSE TestAccElasticBeanstalkApplication_tags
=== RUN   TestAccElasticBeanstalkApplication_description
=== PAUSE TestAccElasticBeanstalkApplication_description
=== RUN   TestAccElasticBeanstalkApplication_appVersionLifecycle
=== PAUSE TestAccElasticBeanstalkApplication_appVersionLifecycle
=== RUN   TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_basic
=== PAUSE TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_basic
=== RUN   TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_duplicateLabels
=== PAUSE TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_duplicateLabels
=== RUN   TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_tags
=== PAUSE TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_tags
=== RUN   TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process
=== PAUSE TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process
=== RUN   TestAccElasticBeanstalkConfigurationTemplate_basic
=== PAUSE TestAccElasticBeanstalkConfigurationTemplate_basic
=== RUN   TestAccElasticBeanstalkConfigurationTemplate_disappears
=== PAUSE TestAccElasticBeanstalkConfigurationTemplate_disappears
=== RUN   TestAccElasticBeanstalkConfigurationTemplate_Disappears_application
=== PAUSE TestAccElasticBeanstalkConfigurationTemplate_Disappears_application
=== RUN   TestAccElasticBeanstalkConfigurationTemplate_vpc
=== PAUSE TestAccElasticBeanstalkConfigurationTemplate_vpc
=== RUN   TestAccElasticBeanstalkConfigurationTemplate_settings
=== PAUSE TestAccElasticBeanstalkConfigurationTemplate_settings
=== RUN   TestAccElasticBeanstalkEnvironment_basic
=== PAUSE TestAccElasticBeanstalkEnvironment_basic
=== RUN   TestAccElasticBeanstalkEnvironment_disappears
=== PAUSE TestAccElasticBeanstalkEnvironment_disappears
=== RUN   TestAccElasticBeanstalkEnvironment_tier
=== PAUSE TestAccElasticBeanstalkEnvironment_tier
=== RUN   TestAccElasticBeanstalkEnvironment_cnamePrefix
=== PAUSE TestAccElasticBeanstalkEnvironment_cnamePrefix
=== RUN   TestAccElasticBeanstalkEnvironment_beanstalkEnv
=== PAUSE TestAccElasticBeanstalkEnvironment_beanstalkEnv
=== RUN   TestAccElasticBeanstalkEnvironment_resource
=== PAUSE TestAccElasticBeanstalkEnvironment_resource
=== RUN   TestAccElasticBeanstalkEnvironment_tags
=== PAUSE TestAccElasticBeanstalkEnvironment_tags
=== RUN   TestAccElasticBeanstalkEnvironment_changeStack
=== PAUSE TestAccElasticBeanstalkEnvironment_changeStack
=== RUN   TestAccElasticBeanstalkEnvironment_update
=== PAUSE TestAccElasticBeanstalkEnvironment_update
=== RUN   TestAccElasticBeanstalkEnvironment_label
=== PAUSE TestAccElasticBeanstalkEnvironment_label
=== RUN   TestAccElasticBeanstalkEnvironment_settingWithJSONValue
=== PAUSE TestAccElasticBeanstalkEnvironment_settingWithJSONValue
=== RUN   TestAccElasticBeanstalkEnvironment_platformARN
=== PAUSE TestAccElasticBeanstalkEnvironment_platformARN
=== RUN   TestAccElasticBeanstalkHostedZoneDataSource_basic
=== PAUSE TestAccElasticBeanstalkHostedZoneDataSource_basic
=== RUN   TestAccElasticBeanstalkHostedZoneDataSource_region
=== PAUSE TestAccElasticBeanstalkHostedZoneDataSource_region
=== RUN   TestAccElasticBeanstalkSolutionStackDataSource_basic
=== PAUSE TestAccElasticBeanstalkSolutionStackDataSource_basic
=== CONT  TestAccElasticBeanstalkApplicationDataSource_basic
=== CONT  TestAccElasticBeanstalkEnvironment_update
=== CONT  TestAccElasticBeanstalkEnvironment_basic
--- PASS: TestAccElasticBeanstalkApplicationDataSource_basic (13.93s)
=== CONT  TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_tags
--- PASS: TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_tags (59.47s)
=== CONT  TestAccElasticBeanstalkConfigurationTemplate_settings
--- PASS: TestAccElasticBeanstalkConfigurationTemplate_settings (17.13s)
=== CONT  TestAccElasticBeanstalkConfigurationTemplate_vpc
--- PASS: TestAccElasticBeanstalkConfigurationTemplate_vpc (18.40s)
=== CONT  TestAccElasticBeanstalkConfigurationTemplate_Disappears_application
--- PASS: TestAccElasticBeanstalkConfigurationTemplate_Disappears_application (15.08s)
=== CONT  TestAccElasticBeanstalkConfigurationTemplate_disappears
--- PASS: TestAccElasticBeanstalkConfigurationTemplate_disappears (15.41s)
=== CONT  TestAccElasticBeanstalkConfigurationTemplate_basic
--- PASS: TestAccElasticBeanstalkConfigurationTemplate_basic (17.65s)
=== CONT  TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process
--- PASS: TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_process (30.83s)
=== CONT  TestAccElasticBeanstalkEnvironment_beanstalkEnv
--- PASS: TestAccElasticBeanstalkEnvironment_basic (353.17s)
=== CONT  TestAccElasticBeanstalkEnvironment_changeStack
--- PASS: TestAccElasticBeanstalkEnvironment_update (541.09s)
=== CONT  TestAccElasticBeanstalkEnvironment_tags
--- PASS: TestAccElasticBeanstalkEnvironment_beanstalkEnv (393.19s)
=== CONT  TestAccElasticBeanstalkEnvironment_resource
--- PASS: TestAccElasticBeanstalkEnvironment_changeStack (434.23s)
=== CONT  TestAccElasticBeanstalkSolutionStackDataSource_basic
--- PASS: TestAccElasticBeanstalkSolutionStackDataSource_basic (7.75s)
=== CONT  TestAccElasticBeanstalkEnvironment_tier
--- PASS: TestAccElasticBeanstalkEnvironment_resource (323.86s)
=== CONT  TestAccElasticBeanstalkEnvironment_cnamePrefix
--- PASS: TestAccElasticBeanstalkEnvironment_tags (387.43s)
=== CONT  TestAccElasticBeanstalkHostedZoneDataSource_region
--- PASS: TestAccElasticBeanstalkHostedZoneDataSource_region (10.93s)
=== CONT  TestAccElasticBeanstalkApplication_description
--- PASS: TestAccElasticBeanstalkApplication_description (22.47s)
=== CONT  TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_duplicateLabels
--- PASS: TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_duplicateLabels (16.96s)
=== CONT  TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_basic
--- PASS: TestAccElasticBeanstalkApplicationVersion_BeanstalkApp_basic (15.59s)
=== CONT  TestAccElasticBeanstalkApplication_appVersionLifecycle
--- PASS: TestAccElasticBeanstalkApplication_appVersionLifecycle (39.91s)
=== CONT  TestAccElasticBeanstalkEnvironment_disappears
--- PASS: TestAccElasticBeanstalkEnvironment_tier (385.57s)
=== CONT  TestAccElasticBeanstalkHostedZoneDataSource_basic
--- PASS: TestAccElasticBeanstalkHostedZoneDataSource_basic (5.77s)
=== CONT  TestAccElasticBeanstalkEnvironment_settingWithJSONValue
--- PASS: TestAccElasticBeanstalkEnvironment_cnamePrefix (326.62s)
=== CONT  TestAccElasticBeanstalkEnvironment_platformARN
--- PASS: TestAccElasticBeanstalkEnvironment_settingWithJSONValue (260.15s)
=== CONT  TestAccElasticBeanstalkEnvironment_label
--- PASS: TestAccElasticBeanstalkEnvironment_disappears (511.11s)
=== CONT  TestAccElasticBeanstalkApplication_disappears
--- PASS: TestAccElasticBeanstalkApplication_disappears (10.57s)
=== CONT  TestAccElasticBeanstalkApplication_tags
--- PASS: TestAccElasticBeanstalkApplication_tags (27.51s)
=== CONT  TestAccElasticBeanstalkApplication_basic
--- PASS: TestAccElasticBeanstalkApplication_basic (13.57s)
--- PASS: TestAccElasticBeanstalkEnvironment_platformARN (495.11s)
--- PASS: TestAccElasticBeanstalkEnvironment_label (434.83s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/elasticbeanstalk	1886.372s

@gmeligio
Copy link
Contributor Author

Thank you for the review @ewbankkit !

@ewbankkit
Copy link
Contributor

@gmeligio Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit d7f5809 into hashicorp:main Aug 26, 2024
39 checks passed
@github-actions github-actions bot added this to the v5.65.0 milestone Aug 26, 2024
@gmeligio gmeligio deleted the beanstalk-process branch August 26, 2024 18:17
Copy link

This functionality has been released in v5.65.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants