Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the object has been modified #266

Open
zzxwill opened this issue Mar 7, 2022 · 5 comments · Fixed by #267
Open

the object has been modified #266

zzxwill opened this issue Mar 7, 2022 · 5 comments · Fixed by #267

Comments

@zzxwill
Copy link
Collaborator

zzxwill commented Mar 7, 2022

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;
zzxwill added a commit to zzxwill/terraform-controller that referenced this issue Mar 7, 2022
zzxwill added a commit to zzxwill/terraform-controller that referenced this issue Mar 8, 2022
@zerunhu
Copy link

zerunhu commented Mar 21, 2022

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"

@zerunhu
Copy link

zerunhu commented Mar 22, 2022

@zzxwill Can you help with this issue?

@zzxwill
Copy link
Collaborator Author

zzxwill commented Mar 23, 2022

@huzerun0306 Can you append your Configuration?

@zerunhu
Copy link

zerunhu commented Mar 24, 2022

@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?

@zerunhu
Copy link

zerunhu commented Mar 24, 2022

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

@zzxwill zzxwill reopened this Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants