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

Copy settings from another instance when creating a new #218

Merged
merged 11 commits into from
Sep 27, 2023
Merged

Conversation

tbroden84
Copy link
Contributor

@tbroden84 tbroden84 commented Aug 10, 2023

WHY are these changes introduced?

When creating a new instance, add support to copy the settings from an already existing one. E.g. copy the same RabbitMQ config and definitions to the new instance.

Requires: https://github.com/84codes/customer-console/pull/204

Reference: #139

WHAT is this pull request doing?

New copy_settings argument block for cloudamqp_instance resource. Declare which other CloudAMQP instance and settings that should be copied. The supported settings that can be copied are, alarms, config, definitions, firewall, logs, metrics and plugins.

HOW can this pull request be tested?

Create a new instance and copy over settings from an older.

resource "cloudamqp_instance" "instance_02" {
  name                = "terraform-cloudamqp-instance-02"
  plan                = "squirrel-1"
  region              = "amazon-web-services::us-west-1"
  rmq_version         = "3.12.2"
  tags                = ["terraform"]
  copy_settings {
    subscription_id = var.instance_id
    settings = ["config", "definitions"]
  }
}

@tbroden84 tbroden84 requested a review from dentarg August 11, 2023 10:51
@tbroden84 tbroden84 marked this pull request as ready for review August 11, 2023 10:51
@dentarg
Copy link
Member

dentarg commented Aug 11, 2023

@tbroden84
Copy link
Contributor Author

Yeah. We also have this old branch: 952638f
Together with the bug fix (if approved), was just easier to start over.

@tbroden84 tbroden84 merged commit 6d7729b into main Sep 27, 2023
1 check passed
@tbroden84 tbroden84 deleted the copy-settings branch September 27, 2023 08:35
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

2 participants