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

[Bug]: Event trigger overrides EJSON configuration #2880

Open
2 tasks done
adamMo opened this issue Dec 11, 2024 · 3 comments
Open
2 tasks done

[Bug]: Event trigger overrides EJSON configuration #2880

adamMo opened this issue Dec 11, 2024 · 3 comments
Labels
not_stale Not stale issue or PR

Comments

@adamMo
Copy link

adamMo commented Dec 11, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Provider Version

v1.22.0

Terraform Version

v1.7.5

Terraform Edition

Terraform Open Source (OSS)

Current Behavior

My trigger configuration looks like this below. In Atlas console I have turned on the Enable Extended JSON option that does not exist in terraform provider. Any time I set up a new trigger or change anything in the existing one, my config is overwritten by terraform... What can I do to prevent that?

Terraform configuration to reproduce the issue

resource "mongodbatlas_event_trigger" "audit_trigger" {
	app_id                      = local.app_id[0]
	name                        = "audit_trigger"
	project_id                  = local.mongo_project_id
	type                        = "DATABASE"
	config_operation_types = ["INSERT", "UPDATE", "REPLACE", "DELETE"]
	config_database             = var.mongo_users_db
	config_collection           = "cases"
	config_service_id           = local.service_id[0]
	unordered                   = false
	config_full_document        = true
	config_full_document_before = true

	disabled = false

	event_processors {
		aws_eventbridge {
			config_account_id = data.aws_caller_identity.current.account_id
			config_region     = local.region
		}
	}
}

Steps To Reproduce

  1. Terraform apply this config

Logs

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Copy link
Contributor

Thanks for opening this issue! Please make sure you've followed our guidelines when opening the issue. In short, to help us reproduce the issue we need:

  • Terraform configuration file used to reproduce the issue
  • Terraform log files from the run where the issue occurred
  • Terraform Atlas provider version used to reproduce the issue
  • Terraform version used to reproduce the issue
  • Confirmation if Terraform OSS, Terraform Cloud, or Terraform Enterprise deployment

The ticket CLOUDP-289410 was created for internal tracking.

@lantoli
Copy link
Member

lantoli commented Dec 16, 2024

thanks @adamMo for opening the issue.

I've been able to reproduce the issue. It happens because the API Update operation is PUT so it will update all attributes, if not sent they'll be reset.

We've added this item to our backlog, we'll keep this issue open in the meantime

@lantoli lantoli added the not_stale Not stale issue or PR label Dec 16, 2024
@adamMo
Copy link
Author

adamMo commented Dec 19, 2024

@lantoli great, waiting for that feature then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not_stale Not stale issue or PR
Projects
None yet
Development

No branches or pull requests

2 participants