oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
760 stars 683 forks source link

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

Open hrvolapeter opened 6 months ago

hrvolapeter commented 6 months ago

Community Note

Terraform Version and Provider Version

OpenTofu v1.6.2 on darwin_arm64

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
tf-oci-pub commented 5 months ago

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.