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

Update workflow for changing RabbitMQ configuration #166

Merged
merged 5 commits into from
Aug 10, 2022

Conversation

tbroden84
Copy link
Contributor

To be able to only change one or multiple configurations, without needing to add all to the configuration file.

Previous need to add all arguments to update configuration:

resource "cloudamqp_rabbitmq_configuration" "rabbit_config" {
  instance_id = cloudamqp_instance.instance.id
  channel_max = 0
  connection_max = -1
  consumer_timeout = -1
  heartbeat = 120
  log_exchange_level = "error"
  max_message_size = 134217728
  queue_index_embed_msgs_below = 4096
  vm_memory_high_watermark = 0.81
}

Change all arguments to also be computed, so each argument can be either used or left out in the providers configuration file.

  • If used, the RabbitMQ configuration will be updated with the argument.
  • Left out, argument will be read from the RabbitMQ configuration and populate the state file.
resource "cloudamqp_rabbitmq_configuration" "rabbit_config" {
  instance_id = cloudamqp_instance.instance.id
  consumer_timeout = -1
  heartbeat = 60
}

Next update:

resource "cloudamqp_rabbitmq_configuration" "rabbit_config" {
  instance_id = cloudamqp_instance.instance.id
  consumer_timeout = 10000
  heartbeat = 120
}

Previous implementation needed all arguments set.

Exclude arguments using default data type (0, 0.0, "") to only update values set in configuration file.
@tbroden84 tbroden84 added the bug Something isn't working label Aug 9, 2022
@tbroden84 tbroden84 removed the bug Something isn't working label Aug 10, 2022
@tbroden84 tbroden84 merged commit 1b0b96a into master Aug 10, 2022
@tbroden84 tbroden84 deleted the computed-rabbitmq-configuration branch August 10, 2022 07:43
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 this pull request may close these issues.

None yet

1 participant