When artifact store is removed manually from code pipeline, null artifact store triggers a panic #7626
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.
Community Note
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
The text was updated successfully, but these errors were encountered: