cloudfoundry-community/terraform-provider-cloudfoundry

annotations are not created after b/g deployment

Opened this issue · 1 comments

I am having an issue with deploying a blue/green application update along with annotation changes.

How to replicate:

  • Update an existing application artifact path
  • Update an existing application annotations

What I see after terraform plan

  • The plan output states the application artifact path is going to be updated
  • The plan output states the application annotation is going to be updated

What I expect after terraform apply

  • The apply completes successfully
  • The application is launched and running the new artifact
  • The application annotation is updated

What I see after terraform apply

  • The apply completes successfully ✅
  • The application is launched and running the new artifact ✅
  • The application annotation is unset ❌

What I see after terraform plan again

  • The plan output states the application annotation is going to be updated

I believe this issue originates from https://github.com/cloudfoundry/cli/blob/main/resources/metadata_resource.go#L6 missing definition for annotations, but it's unclear to me why annotation is not part of metadata_resource

We do have a very similar problem, without a bg deployment strategy. For us, attributes are only updated on a second or sometimes even third run of terraform apply. The update is planned correctly and the apply runs without an error.