terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

build_pipeline update BuildPipelineParameters don't seem to be optional as documented

Open hrvolapeter opened this issue 1 month ago • 1 comments

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 and Provider Version

OpenTofu v1.6.2 on darwin_arm64

  • provider registry.opentofu.org/oracle/oci v5.43.0

Affected Resource(s)

oci_devops_build_pipeline

Terraform Configuration Files

resource "oci_devops_build_pipeline" "lz_pipeline" {
    project_id = oci_devops_project.landing_zone_project.id
    description = "LZ CI/CD pipeline" 
    display_name = "dvb-lz-deploy"
}

Debug Output

Output 2024-05-30T11:23:47.162+0200 [INFO] Starting apply for oci_devops_build_pipeline.lz_pipeline 2024-05-30T11:23:47.162+0200 [DEBUG] oci_devops_build_pipeline.lz_pipeline: applying the planned Update change 2024-05-30T11:23:47.162+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.162844 eventual_consistency.go:332: (pid=22757, gid=11) EcContext.GetEndOfWindow returns 2024-05-30T11:23:47.162+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.162870 asm_arm64.s:1197: Retry policy to use: {MaximumNumberAttempts=0, MinSleepBetween=0, MaxSleepBetween=0, ExponentialBackoffBase=0, NonEventuallyConsistentPolicy=} 2024-05-30T11:23:47.162+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.162877 asm_arm64.s:1197: operation attempt #1 2024-05-30T11:23:47.162+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.162920 http.go:725: Marshaling to Request: UpdateBuildPipelineRequest 2024-05-30T11:23:47.162+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.162977 http.go:643: Marshaling to path from field: BuildPipelineId in template: /buildPipelines/{buildPipelineId} 2024-05-30T11:23:47.163+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.163093 http.go:647: Marshaling to body from field:UpdateBuildPipelineDetails 2024-05-30T11:23:47.163+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.163150 http.go:167: Adjusting tag: mandatory is false and json tag is valid on field: Description 2024-05-30T11:23:47.163+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.163169 http.go:167: Adjusting tag: mandatory is false and json tag is valid on field: DisplayName 2024-05-30T11:23:47.163+0200 [DEBUG] provider.terraform-provider-oci_v5.43.0: DEBUG 2024/05/30 11:23:47.163174 http.go:167: Adjusting tag: mandatory is false and json tag is valid on field: BuildPipelineParameters 2024-05-30T11:23:47.173+0200 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot 2024-05-30T11:23:47.173+0200 [ERROR] vertex "oci_devops_build_pipeline.lz_pipeline" error: can not omit nil fields for field: BuildPipelineParameters, due to: can not omit nil fields for field: Items, due to: can not omit nil fields, data was expected to be a not-nil list

Expected Behavior

Update in place

Actual Behavior

╷
│ Error: can not omit nil fields for field: BuildPipelineParameters, due to: can not omit nil fields for field: Items, due to: can not omit nil fields, data was expected to be a not-nil list
│ 
│   with oci_devops_build_pipeline.lz_pipeline,
│   on devops.tf line 80, in resource "oci_devops_build_pipeline" "lz_pipeline":
│   80: resource "oci_devops_build_pipeline" "lz_pipeline" {
│ 

Steps to Reproduce

  1. Change name of previously applied build pipepline definition
  2. Plan produces in-place update of name
  3. tofu apply

hrvolapeter avatar May 30 '24 09:05 hrvolapeter