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

tests/resource/aws_codebuild_project: Add test covering environment variable removal #8191

Merged
merged 1 commit into from
Apr 4, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Apr 4, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

References:

The environment configuration block environment_variable configuration block came up in our Optional: true and Computed: true discovery as potentially problematic in Terraform 0.12 when the ability to use attribute syntax to zero out the configuration will require special implementation. However, it appears the functionality will actually continue to work due to the environment configuration block Set function and how updates of it are implemented.

Here we still add the covering test for when the environment configuration block attribute is switched from TypeSet to TypeList during future simplification work. While it would probably be okay to just remove Computed: true now, we take the less risky approach of just leaving this as-is for now until that simplification work is completed.

Output from acceptance testing:

--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable (37.91s)

…ariable removal

References:

* hashicorp/terraform#20505
* #6427

The `environment` configuration block `environment_variable` configuration block came up in our `Optional: true` and `Computed: true` discovery as potentially problematic in Terraform 0.12 when the ability to use attribute syntax to zero out the configuration will require special implementation. However, it appears the functionality will actually continue to work due to the `environment` configuration block `Set` function and how updates of it are implemented.

Here we still add the covering test for when the `environment` configuration block attribute is switched from `TypeSet` to `TypeList` during future simplification work. While it would probably be okay to just remove `Computed: true` now, we take the less risky approach of just leaving this as-is for now until that simplification work is completed.

Output from acceptance testing:

```
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable (37.91s)
```
@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/codebuild Issues and PRs that pertain to the codebuild service. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Apr 4, 2019
@bflad bflad added this to the 0.12-support milestone Apr 4, 2019
@bflad bflad requested a review from a team April 4, 2019 15:54
@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Apr 4, 2019
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM

@bflad bflad merged commit 0e2c3e2 into master Apr 4, 2019
@bflad bflad deleted the td-aws_codebuild_project-ConfigMode branch April 4, 2019 20:01
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/codebuild Issues and PRs that pertain to the codebuild service. size/M Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. 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.

2 participants