terraform-controller
terraform-controller copied to clipboard
the object has been modified
I0304 06:46:10.787607 1 configuration_controller.go:203] "performing Terraform Apply (cloud resource create/update)" Namespace="serverless-devs-default" Name="fc-test-202203041410-1455541096406548-environment"
│ I0304 06:46:10.787640 1 configuration_controller.go:263] "terraform apply job" Namespace="serverless-devs-default" Name="fc-test-202203041410-1455541096406548-environment-apply"
│ E0304 06:46:10.817911 1 configuration_controller.go:277] "Hit an issue to update Terraform apply job" err="Operation cannot be fulfilled on configurations.terraform.core.oam.dev \"fc-test-202203041410-1455541096406548-environment\": the object has been modified;
Hello, we have encountered this problem. I saw that it was fixed twelve days ago. We are using version 0.4.3(Chart.yaml file, version: 0.4.3). I saw that it has been fixed in 0.4.2. This error should not occur. , but it still occurs, that is, after modifying the tf configuration of the configuration file, the error found by viewing the controller's log
E0321 11:56:12.886662 1 controller.go:304] controller-runtime/manager/controller/configuration "msg"="Reconciler error" "error"="Operation cannot be fulfilled on configurations.terraform.core.oam.dev \"qmdgl-gslb\": the object has been modified; please apply your changes to the latest version and try again" "name"="qmdgl-gslb" "namespace"="default" "reconciler group"="terraform.core.oam.dev" "reconciler kind"="Configuration"
@zzxwill Can you help with this issue?
@huzerun0306 Can you append your Configuration?
@zzxwill The custom configuration is used, and the content is as follows. The configuration of tf will not be posted. It is a provider developed by ourselves. Because it is a custom provider, the configuration of our provider (secret_id, secret_key) including other secret keys are all Written directly in spec.hcl, because spec.providerRef must be filled in, so we created a Provider.terraform.core.oam.dev/v1beta1 that has no effect. The creation of the configuration is successful, and then we modify the tf configuration in the configuration. For example, when adding a resource, when executing kubectl apply -f configuration.yaml, I can see that terraform-controller reported the error I posted earlier
apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
metadata:
name: custom-example
spec:
providerRef:
name: custom
hcl: |
I remember that Alibaba's open source products will have a DingTalk exchange group. I found that there is no such thing? Is there a DingTalk group communication?
provider.yaml
apiVersion: v1
kind: Secret
metadata:
name: custom-account-creds
namespace: vela-system
type: Opaque
data:
credentials: xxxxxxxxxxxxxxxxxxxxxxxxx
---
apiVersion: terraform.core.oam.dev/v1beta1
kind: Provider
metadata:
name: custom
spec:
provider: custom
region: cn-nanjing
credentials:
source: Secret
secretRef:
namespace: vela-system
name: custom-account-creds
key: credentials