Skip to content

Commit

Permalink
Prepade release v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
timohirt committed Jan 18, 2022
1 parent babf6e0 commit a6bfa6b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 42 deletions.
27 changes: 15 additions & 12 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ and download the archive.

## Installing the Provider

### Terraform 0.12

Terraform looks for providers in `~/.terraform.d/plugins`. Extract the archive and
copy the executable to this directory. See [Terraform documentation](https://www.terraform.io/docs/configuration/providers.html#third-party-plugins)
for more details.

```bash
$ mkdir -p ~/.terraform.d/plugins
$ tar xzf terraform-provider-hetznerdns_1.0.0_linux_amd64.tar.gz
$ mv ./terraform-provider-hetznerdns ~/.terraform.d/plugins
```

### Terraform 0.13

Terraform 0.13 changed the [location of custom providers](https://www.terraform.io/upgrade-guides/0-13.html#new-filesystem-layout-for-local-copies-of-providers), in order to work
Expand All @@ -35,6 +23,21 @@ As you can see above, the version as well as the operating system is now include
the path and filename. Make sure you pick the right binaries for the os and use `darwin_amd64`
or `win_amd64` instead of `linux_amd64` if necessary.

### Using the Provider on your Local Machine

Add the following to your `terraform.tf`.

```terraform
terraform {
required_providers {
hetznerdns = {
source = "github.com/timohirt/hetznerdns"
}
}
required_version = ">= 1.0"
}
```

## Testing

Next add a hetznerdns resource or data source to your project and run
Expand Down
45 changes: 15 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,43 @@

Read about what I learnt while [implementing this Terraform Provider](http://www.timohirt.de/blog/implementing-a-terraform-provider/).

**This provider is on published on the Terraform registry**. You can find resources
and data sources [documentation](https://registry.terraform.io/providers/timohirt/hetznerdns/latest/docs) there
or [here](docs).
**This provider is on published on the Terraform registry**.

You can find resources and data sources
[documentation](https://registry.terraform.io/providers/timohirt/hetznerdns/latest/docs)
there or [here](docs).

## Requirements

- [Terraform](https://www.terraform.io/downloads.html) 0.12.x / 0.13.x
- Read how [insekticid](https://github.com/insekticid) migrated from 0.12 to 0.13 in this [article](https://www.exploit.cz/how-to-migrate-from-plugins-to-terraform-0-13-registry-providers/).
- [Go](https://golang.org/) 1.14 (to build the provider plugin)
- [Terraform](https://www.terraform.io/downloads.html) > v1.0
- [Go](https://golang.org/) 1.16 (to build the provider plugin)

## Installing and Using this Plugin

You most likely want to download the provider from [Terraform
Registry](https://registry.terraform.io/providers/timohirt/hetznerdns/latest/docs).
If you want or need to install the provider locally, take a look at
[INSTALL](./INSTALL.md). For Terraform <= 0.12 this is required in order
to use this provider.
[INSTALL](./INSTALL.md).

### Using Provider from Terraform Registry (TF >= 0.13)
### Using Provider from Terraform Registry (TF >= 1.0)

Terraform introduced the Terrafrom registry with version 0.13. This
provider is published and available there. If you want to use it, just
This provider is published and available there. If you want to use it, just
add the following to your `terraform.tf`:

```terraform
terraform {
required_providers {
hetznerdns = {
source = "timohirt/hetznerdns"
version = "1.2.0"
version = "2.0.0"
}
}
required_version = ">= 0.13"
required_version = ">= 1.0"
}
```

Then run `terraform init` to download the provider.

### Install and Use Provider on your Local Machine (TF >=0.13)

After installing the provider as descibed in [INSTALL](./INSTALL.md),
add the following to your `terraform.tf`.

```terraform
terraform {
required_providers {
hetznerdns = {
source = "github.com/timohirt/hetznerdns"
}
}
required_version = ">= 0.13"
}
```

## Authentication

Once installed you have three options to provide the required API token that
Expand Down Expand Up @@ -114,7 +99,7 @@ resource "hetznerdns_record" "example_com_root" {
value = hcloud_server.server_name.ipv4_address
type = "A"
# You only need to set a TTL if it's different from the zone's TTL above
ttl = 70
ttl = 300
}
# Handle wildcard subdomain (*.example.com)
Expand Down

0 comments on commit a6bfa6b

Please sign in to comment.