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

When artifact store is removed manually from code pipeline, null artifact store triggers a panic #7626

Closed
jasonmcintosh opened this issue Feb 20, 2019 · 2 comments
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/codepipeline Issues and PRs that pertain to the codepipeline service.

Comments

@jasonmcintosh
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

11.11
provider 1.59

Affected Resource(s)

aws_codepipeline
https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_codepipeline.go#L230

Terraform Configuration Files

Panic Output

Relevant section:

2019-02-20T14:09:19.244-0600 [DEBUG] plugin.terraform-provider-aws_v1.59.0_x4: panic: runtime error: invalid memory address or nil pointer dereference
2019-02-20T14:09:19.244-0600 [DEBUG] plugin.terraform-provider-aws_v1.59.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x31a957b]
2019-02-20T14:09:19.244-0600 [DEBUG] plugin.terraform-provider-aws_v1.59.0_x4:
2019-02-20T14:09:19.244-0600 [DEBUG] plugin.terraform-provider-aws_v1.59.0_x4: goroutine 4345 [running]:
2019-02-20T14:09:19.244-0600 [DEBUG] plugin.terraform-provider-aws_v1.59.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.flattenAwsCodePipelineArtifactStore(...)
2019-02-20T14:09:19.244-0600 [DEBUG] plugin.terraform-provider-aws_v1.59.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go:230
2019-02-20T14:09:19.244-0600 [DEBUG] plugin.terraform-provider-aws_v1.59.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsCodePipelineRead(0xc000884d20, 0x40679c0, 0xc0003e9c00,

Expected Behavior

When someone manually removes artifact_store from a pipeline, terraform detects that and will add it back vs. fail.

Actual Behavior

Terraform crashes

Steps to Reproduce

Create a code pipeline with an artifact store section
Manually remove that
terraform refresh

References

Similar to issue fixed:
5a7e986#diff-7638735654251851e45474e21f91b4eb

@ghost ghost added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Feb 20, 2019
@bflad bflad added the service/codepipeline Issues and PRs that pertain to the codepipeline service. label Feb 21, 2019
@bflad
Copy link
Member

bflad commented Feb 21, 2019

Hi @jasonmcintosh 👋 Thanks for submitting this and sorry for the unexpected behavior here.

The resource code there was operating under a previous assumption that AWS CodePipeline always required a single artifact store. Seemingly with the release of cross-region artifact stores (feature request #6871), the API made the single artifact store response optional with a separate field for multiple artifact stores.

We actually have a previously filed issue for this (#7573) that I just updated the issue title to be more searchable and a work in progress pull request submitted (#7587). To consolidate efforts and discussions, we will close this issue in preference of those existing ones. 👍

@bflad bflad closed this as completed Feb 21, 2019
@ghost
Copy link

ghost commented Mar 31, 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!

@hashicorp hashicorp locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/codepipeline Issues and PRs that pertain to the codepipeline service.
Projects
None yet
Development

No branches or pull requests

2 participants