louy / terraform-provider-uptimerobot

A terraform provider for UptimeRobot
Mozilla Public License 2.0
123 stars 85 forks source link

Error on the "uptimerobot_alert_contact" data #29

Closed nlamirault closed 5 years ago

nlamirault commented 5 years ago

Hi, i would try the new data/resources "alert_contact", but i've got some errors :

$ terraform init

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...

Provider "uptimerobot" not available for installation.

A provider named "uptimerobot" could not be found in the official repository.

This may result from mistyping the provider name, or the given provider may
be a third-party provider that cannot be installed automatically.

In the latter case, the plugin must be installed manually by locating and
downloading a suitable distribution package and placing the plugin's executable
file in the following directory:
    terraform.d/plugins/linux_amd64

Terraform detects necessary plugins by inspecting the configuration and state.
To view the provider versions requested by each module, run
"terraform providers".

Install the provider :

$ cp terraform-provider-uptimerobot ~/.terraform.d/plugins/linux_amd64/

Terraform actions :

$ terraform init

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

$ terraform plan -var-file=../personal/galactus.tfvars 

Error: data.uptimerobot_alert_contact.default_alert_contact: Provider doesn't support data source: uptimerobot_alert_contact

With this code :

data "uptimerobot_account" "account" {}

data "uptimerobot_alert_contact" "default_alert_contact" {
  friendly_name = "${data.uptimerobot_account.account.email}"
}

resource "uptimerobot_monitor" "google_com" {
  url           = "http://google.com"
  type          = "http"
  friendly_name = "Google"
}

Any idea ?

drubin commented 5 years ago

Hi @nlamirault https://github.com/louy/terraform-provider-uptimerobot/pull/21 this was only merged 18 hours ago and hasn't been published as a release yet.

You can check out the master branch and compile it your self and then your instructions should work.

Hope this helps and that @louy will publish a release soon.

nlamirault commented 5 years ago

Hi @drubin i sw that. But i've build the master branch before my test.

$ go build .
$ mv ./terraform-provider-uptimerobot ~/.terraform.d/plugins/linux_amd64/
$ lt ~/.terraform.d/plugins/linux_amd64/terraform-provider-uptimerobot 
.rwxr-xr-x  nicolas  users  26.2 MB  Fri May 24 17:32:43 2019    terraform-provider-uptimerobot
$ terraform init

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
$ terraform plan -var-file=../personal/galactus.tfvars 

Error: data.uptimerobot_alert_contact.default_alert_contact: Provider doesn't support data source: uptimerobot_alert_contact
caarlos0 commented 5 years ago

I just built from master here and it works...

louy commented 5 years ago

Hi guys. I know it's been a while. Is this still an issue or can we close it?

caarlos0 commented 5 years ago

@louy I'm using a build from master and it was working fine...

louy commented 5 years ago

I'll close this issue then. Feel free to file a new one if you face this problem again!