Skip to content

Commit

Permalink
Add apikey and url properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarkentin committed Dec 29, 2017
1 parent ae2cab3 commit ea1cd64
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
20 changes: 13 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
provider "cloudamqp" {}

resource "cloudamqp_instance" "my_instance" {
name = "terraform-provider-test-instance-1"
plan = "lemur"
resource "cloudamqp_instance" "instance1" {
name = "terraform-provider-test-instance-1"
plan = "lemur"
region = "amazon-web-services::us-east-1"
}

resource "cloudamqp_instance" "my_instance2" {
name = "terraform-provider-test-instance-2"
plan = "lemur"
region = "amazon-web-services::us-east-1"
output "instance_name" {
value = "${cloudamqp_instance.instance1.name}"
}

output "instance_url" {
value = "${cloudamqp_instance.instance1.url}"
}

output "instance_apikey" {
value = "${cloudamqp_instance.instance1.apikey}"
}
10 changes: 10 additions & 0 deletions resource_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ func resourceInstance() *schema.Resource {
Optional: true,
Description: "RabbitMQ version",
},
"url": {
Type: schema.TypeString,
Computed: true,
Description: "URL of the CloudAMQP instance",
},
"apikey": {
Type: schema.TypeString,
Computed: true,
Description: "API key for the CloudAMQP instance",
},
},
}
}
Expand Down

0 comments on commit ea1cd64

Please sign in to comment.