{"id":15175892,"url":"https://github.com/hashicorp/terraform-provider-cloudamqp","last_synced_at":"2025-10-01T14:31:14.548Z","repository":{"id":56372311,"uuid":"279364118","full_name":"hashicorp/terraform-provider-cloudamqp","owner":"hashicorp","description":"Moved to https://github.com/cloudamqp/terraform-provider-cloudamqp","archived":true,"fork":false,"pushed_at":"2020-11-11T17:09:29.000Z","size":27469,"stargazers_count":2,"open_issues_count":6,"forks_count":7,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-01-08T13:07:35.410Z","etag":null,"topics":["cloudamqp","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"https://github.com/cloudamqp/terraform-provider-cloudamqp","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashicorp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-13T17:06:04.000Z","updated_at":"2023-01-28T11:54:40.000Z","dependencies_parsed_at":"2022-08-15T17:31:12.896Z","dependency_job_id":null,"html_url":"https://github.com/hashicorp/terraform-provider-cloudamqp","commit_stats":null,"previous_names":["terraform-providers/terraform-provider-cloudamqp"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fterraform-provider-cloudamqp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fterraform-provider-cloudamqp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fterraform-provider-cloudamqp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashicorp%2Fterraform-provider-cloudamqp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashicorp","download_url":"https://codeload.github.com/hashicorp/terraform-provider-cloudamqp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234878292,"owners_count":18900676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudamqp","terraform","terraform-provider"],"created_at":"2024-09-27T12:43:43.144Z","updated_at":"2025-10-01T14:31:08.024Z","avatar_url":"https://github.com/hashicorp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform provider for CloudAMQP\n\nSetup your CloudAMQP cluster from Terraform\n\n## Getting Started (As a Terraform User)\n\n### Prerequisites\n\nGolang, make, Terraform\n\n## Setup prerequisites and CloudAMQP account\n\n* Install golang: https://golang.org/dl/\n  Example with default paths\n  * Download latest version and extract to `/usr/local/go`\n  * Set environmental variable `export GOROOT=/usr/local/go`\n  * Set environmental variable `export GOPATH=$HOME/go`\n  * Set environmental variable `export PATH=$GOROOT/bin:$GOPATH:$GOPATH/bin:$PATH`\n  * Activate module mode `export GO111MODULE=on` (Very important!)\n* Install make\n  * `sudo apt install make`\n* Install terraform: https://learn.hashicorp.com/terraform/getting-started/install.html\n  * Download the latest version and extract to /usr/local/terraform\n  * Set environmental variable `export PATH=/usr/local/terraform:$PATH`\n\n* Create a CloudAMQP account if you haven't already:\n  * Go to https://www.cloudamqp.com/\n  * Click \"Sign Up\"\n  * Sign in\n  * Go to API access (https://customer.cloudamqp.com/apikeys) and create a key. (note that this is the API key for one of the two APIs CloudAMQP supports.)\n\n`\nThe two APIs supported can be found at https://docs.cloudamqp.com (called customer) and https://docs.cloudamqp.com/cloudamqp_api.html (called api). The API key created gain access to the customer API (used to handle the instance). While the second API handles different resources on the instace (such as alarms, notification etc.). The customer API also has a proxy service, which makes it possible for the provider to access the second API through customer API using the same created API key.\n`\n\n## Install the CloudAMQP Terraform Provider\n\nClone repository to `$GOPATH/src/github.com/cloudamqp/terraform-provider-cloudamqp`\n\nChange directory and build the provider from make. This will call `go intall` and install the plugin under `$GOPATH/bin`.\n\n```sh\n$ cd $GOPATH/src/github.com/cloudamqp/terraform-provider-cloudamqp\n$ make build\n```\n\nRun `terraform init` from the same folder as the tf.file is located. Terraform should also search in `$GOPATH/bin`. If this not the case, the provider needs to be manually installed by moving it to `$HOME/.terraform.d/plugins`. [Install plugins](https://www.terraform.io/docs/plugins/basics.html#installing-plugins). If `$HOME/.terraform.d/plugins` don't exists, the directory needs to be created.\n\n```sh\n$ mkdir -p ~/.terraform.d/plugins\n$ cp $GOPATH/bin/terraform-provider-cloudamqp $HOME/.terraform.d/plugins/terraform-provider-cloudamqp\n$ cd \u003cpath_to_tf_file\u003e\n$ terraform init\n```\n\nMore detailed documentation of the provider can be found at: https://docs.cloudamqp.com/cloudamqp_terraform.html\n\n### Example Usage: Deploying a First CloudAMQP RMQ server\n\n(See the examples.tf file in the repo.  It has a bunny VPC example and a simple lemur example.)\n\n```sh\ncd $GOPATH/src/github.com/cloudamqp/terraform-provider-cloudamqp  #This is the root of the repo where examples.tf lives.\nterraform plan\n```\n\nWhen prompted paste in your CloudAMQP API key (created above).\n\nThis will give you output on stdout that tells you what would have been created:\n\n* rmq_lemur\n\nNext run\n\n```sh\nterraform apply\n```\n\nAgain, paste in your API key.  This should create an actual CloudAMQP instance.\n\n\n## Debug log\n\nIf more information needed, it's possible to increase Terraform log level. Using *DEBUG* will enable both CloudAMQP and underlying go-api debug logging.\n\nTo enable Terraform debug logging.\n`export TF_LOG=DEBUG`\n\n## Resources\n\nResource documentation can be found [here](https://docs.cloudamqp.com/cloudamqp_terraform.html)\n\n### Instance ###\n\n**IMPORTANT - PLAN CHANGES BETWEEN SHARED AND DEDICATED**\n`\nIt’s possible to change between shared and dedicated plans (or vice versa). This will however force a destruction of the old instance, before creating a new one. All data will be lost and a new hostname will be created with corresponding DNS record.\n`\n\n## Import\n\nImport existing infrastructure into state and bring the resource under Terraform management. Information about the resource will be added to the terraform.state file. Then add manually the given information to the .tf file. Once this is done, run terraform plan to see that the resource is under Terraform management. From here it's possible to add more resources such as alarm.\n\n### Instance:\n\nImport cloudamqp instance and bring it under Terraform management. First declare an empty instance resource in the .tf file. Followed by running the terraform import command\n\n```sh\nresource \"cloudamqp_instance\".\"rmq_url\" {}\n```\n\nGeneric form of terraform import command\n\n```sh\nterraform import {resource_type}.{resource_name} {resource_id}\n```\n\nExample of terraform import command (with resource_id=80)\n\n```sh\nterraform import cloudamqp_instance.rmq_url 80\n```\n\n### Resources depending on an instance:\n\nAll resources depending on the instance resource also needs the instance id when using terraform import, in order to make correct API calls. Resource id and instance id is seperated with \",\".\n\nResource affected by this is:\n\n* cloudamqp_notification\n* cloudamqp_alarm\n\nFirst declare two empty notification and alarm resources in the .tf file. Followed by running the terraform import command.\n\n```sh\nresource \"cloudamqp_notification\".\"recipient_01\" {}\nresource \"cloudamqp_alarm\".\"alarm_01\" {}\n```\n\nGeneric form of terraform import command\n\n```sh\nterraform import {resource_type}.{resource_name} {resource_id},{instance_id}\n```\n\nYou can find `{instance_id}` through [the API](https://docs.cloudamqp.com/#instances)\n\nExample of terraform import command (with instance_id=80)\n\n```sh\nterraform import cloudamqp_notification.recipient_01 10,80\nterraform import cloudamqp_alarm.alarm_01 65,80\n```\n\n## AWS VPC Setup\n\nSupport for setting up VPC peering connection between AWS instance and CloudAMQP. Requires that the AWS instance is used as the requester and CloudAMQP used as an accepter. More detailed description can be found here: [setup](https://docs.cloudamqp.com/cloudamqp_terraform.html#aws-vpc-setup)\n\nTogether with at full example found under *sample/aws_vpc*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fterraform-provider-cloudamqp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashicorp%2Fterraform-provider-cloudamqp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashicorp%2Fterraform-provider-cloudamqp/lists"}