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

Feature request: Topic protection #179

Open
RafaelloLoliop opened this issue May 24, 2021 · 2 comments
Open

Feature request: Topic protection #179

RafaelloLoliop opened this issue May 24, 2021 · 2 comments

Comments

@RafaelloLoliop
Copy link

Looking for simple flag to prevent removal of topic resource on client side.

As lifecycle is not something enough adjustable in this case, small addition to provider will be much welcome. Similar solution can be found here

@Mongey
Copy link
Owner

Mongey commented Jun 30, 2021

@RafaelloLoliop
You could leverage the terraform lifecycle prevent_destroy param here

resource "kafka_topic" "logs" {
  name               = "systemd_logs"
  replication_factor = 2
  partitions         = 100

  lifecycle {
    prevent_destroy = true
  }
}

@RafaelloLoliop
Copy link
Author

@Mongey
Lifecycle require to have string literal. I think common way to setup kafka topic is by using for loop (at least my:P) -> then it is impossible to set lifecycle flag from variable or somehow change later only for single topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants