Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #272 from displague/equinix-metal
Browse files Browse the repository at this point in the history
rename Packet to Equinix Metal
  • Loading branch information
rainleander authored Oct 14, 2020
2 parents aca6071 + 7cc5078 commit e702f46
Show file tree
Hide file tree
Showing 36 changed files with 161 additions and 166 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at support@packet.com. All
reported by contacting the project team at support@equinixmetal.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
4 changes: 2 additions & 2 deletions OWNERS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Owners

This project is governed by [Packet](https://packet.com) and benefits from a community of users that collaborate and contribute to its use in Kubernetes on Packet.
This project is governed by [Equinix Metal](https://metal.equinix.com) and benefits from a community of users that collaborate and contribute to its use in Kubernetes on Equinix Metal.

Members of the Packet Github organization will strive to triage issues in a timely manner, see [SUPPORT.md](.github/SUPPORT.md) for details.
Members of the Equinix Metal Github organization will strive to triage issues in a timely manner, see [SUPPORT.md](.github/SUPPORT.md) for details.

See the [packethost/standards glossary](https://github.com/packethost/standards/blob/master/glossary.md#ownersmd) for more details about this file.
65 changes: 29 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,46 @@
Terraform Provider
==================
# Equinix Metal Terraform Provider

- Website: https://www.terraform.io
- [![Gitter chat](https://badges.gitter.im/hashicorp-terraform/Lobby.png)](https://gitter.im/hashicorp-terraform/Lobby)
- ![](https://img.shields.io/badge/Stability-Maintained-green.svg)
- Mailing list: [Google Groups](http://groups.google.com/group/terraform-tool)
[![GitHub release](https://img.shields.io/github/release/packethost/terraform-provider-packet/all.svg?style=flat-square)](https://github.com/packethost/terraform-provider-packet/releases)
![](https://img.shields.io/badge/Stability-Maintained-green.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/packethost/terraform-provider-packet)](https://goreportcard.com/report/github.com/packethost/terraform-provider-packet)

<img src="https://cdn.rawgit.com/hashicorp/terraform-website/master/content/source/assets/images/logo-hashicorp.svg" width="600px">
[![Slack](https://slack.equinixmetal.com/badge.svg)](https://slack.equinixmetal.com)
[![Twitter Follow](https://img.shields.io/twitter/follow/equinixmetal.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=equinixmetal)

This repository is [Maintained](https://github.com/packethost/standards/blob/master/maintained-statement.md) meaning that this software is supported by Packet and its community - available to use in production environments.
<img src="https://metal.equinix.com/metal/images/logo/equinix-metal-full.svg" width="600px">

Requirements
------------
[Packet is now Equinix Metal!](https://blog.equinix.com/blog/2020/10/06/equinix-metal-metal-and-more/)

- [Terraform](https://www.terraform.io/downloads.html) 0.10.x
- [Go](https://golang.org/doc/install) 1.13 (to build the provider plugin)
This repository is [Maintained](https://github.com/packethost/standards/blob/master/maintained-statement.md) meaning that this software is supported by Equinix Metal and its community - available to use in production environments.

Building the provider
---------------------
## Using the provider

The Equinix Metal provider will be installed on `terraform init` of a template using any of the `packet_*` resources.

See <https://registry.terraform.io/providers/packethost/packet/latest/docs> for documentation on the resources included in this provider.

## Requirements

- [Terraform 0.12+](https://www.terraform.io/downloads.html) (for v3.0.0 of this provider and newer)
- [Go](https://golang.org/doc/install) 1.13 (to build the provider plugin)

## Building the provider

Clone repository to: `$GOPATH/src/github.com/packethost/terraform-provider-packet`

```sh
$ mkdir -p $GOPATH/src/github.com/packethost; cd $GOPATH/src/github.com/packethost
$ git clone git@github.com:packethost/terraform-provider-packet
mkdir -p $GOPATH/src/github.com/packethost; cd $GOPATH/src/github.com/packethost
git clone git@github.com:packethost/terraform-provider-packet
```

Enter the provider directory and build the provider

```sh
$ cd $GOPATH/src/github.com/packethost/terraform-provider-packet
$ make build
cd $GOPATH/src/github.com/packethost/terraform-provider-packet
make build
```

Using the provider
----------------------

The packet provider will be installed on `terraform init` of a template using any of the `packet_*` resources.

Available resource and datasources are documented at [https://www.terraform.io/docs/providers/packet/index.html](https://www.terraform.io/docs/providers/packet/index.html).


Developing the provider
---------------------------
## Developing the provider

If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.13+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.

Expand All @@ -55,9 +53,7 @@ $ $GOPATH/bin/terraform-provider-packet
...
```


Testing provider code
---------------------------
## Testing provider code

We have mostly acceptance tests in the provider. There's no point for you to run them all, but you should run the one covering the functionality which you change. The acceptance test run will cost you some money, so feel free to abstain. The acceptance test suite will be run for your PR during the review process.

Expand All @@ -73,13 +69,10 @@ If you want to see HTTP traffic, set `TF_LOG=DEBUG`, i.e.
TF_LOG=DEBUG TF_ACC=1 go test -v -timeout=20m -run=TestAccPacketDevice_Basic
```



Testing the provider with Terraform
---------------------------------------
## Testing the provider with Terraform

Once you've built the plugin binary (see [Developing the provider](#developing-the-provider) above), it can be incorporated within your Terraform environment using the `-plugin-dir` option. Subsequent runs of Terraform will then use the plugin from your development environment.

```sh
$ terraform init -plugin-dir $GOPATH/bin
terraform init -plugin-dir $GOPATH/bin
```
6 changes: 3 additions & 3 deletions docs/data-sources/device.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
page_title: "Packet: packet_device"
page_title: "Equinix Metal: packet_device"
subcategory: ""
description: |-
Provides a Packet device datasource. This can be used to read existing devices.
Provides an Equinix Metal device datasource. This can be used to read existing devices.
---

# packet_device

Provides a Packet device datasource.
Provides an Equinix Metal device datasource.

~> **Note:** All arguments including the `root_password` and `user_data` will be stored in
the raw state as plain-text.
Expand Down
8 changes: 4 additions & 4 deletions docs/data-sources/device_bgp_neighbors.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
page_title: "Packet: packet_device_bgp_neighbors"
page_title: "Equinix Metal: packet_device_bgp_neighbors"
subcategory: ""
description: |-
Provides a datasource for listing BGP neighbors of a Packet device
Provides a datasource for listing BGP neighbors of an Equinix Metal device
---

# packet_device_bgp_neighbors

Use this datasource to retrieve list of BGP neighbors of a device in the Packet host.
Use this datasource to retrieve list of BGP neighbors of a device in the Equinix Metal host.

To have any BGP neighbors listed, the device must be in [BGP-enabled project](../r/project.html) and have a [BGP session](../r/bgp_session.html) assigned.

To learn more about using BGP in Packet, see the [packet_bgp_session](../r/bgp_session.html) resource documentation.
To learn more about using BGP in Equinix Metal, see the [packet_bgp_session](../r/bgp_session.html) resource documentation.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/ip_block_ranges.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
page_title: "Packet: ip_block_ranges"
page_title: "Equinix Metal: ip_block_ranges"
subcategory: ""
description: |-
List IP address ranges allocated to a project
Expand All @@ -9,7 +9,7 @@ description: |-

Use this datasource to get CIDR expressions for allocated IP blocks of all the types in a project, optionally filtered by facility.

There are four types of IP blocks in Packet: global IPv4, public IPv4, private IPv4 and IPv6. Both global and public IPv4 are routable from the Internet. Public IPv4 block is allocated in a facility, and addresses from it can only be assigned to devices in that facility. Addresses from Global IPv4 block can be assigned to a device in any facility.
There are four types of IP blocks in Equinix Metal: global IPv4, public IPv4, private IPv4 and IPv6. Both global and public IPv4 are routable from the Internet. Public IPv4 block is allocated in a facility, and addresses from it can only be assigned to devices in that facility. Addresses from Global IPv4 block can be assigned to a device in any facility.

The datasource has 4 list attributes: `global_ipv4`, `public_ipv4`, `private_ipv4` and `ipv6`, each listing CIDR notation (`<network>/<mask>`) of respective blocks from the project.

Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/operating_system.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
page_title: "Packet: operating_system"
page_title: "Equinix Metal: operating_system"
subcategory: ""
description: |-
Get a Packet operating system image
Get an Equinix Metal operating system image
---

# packet\_operating\_system

Use this data source to get Packet Operating System image.
Use this data source to get Equinix Metal Operating System image.

## Example Usage

Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/organization.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
page_title: "Packet: packet_organization"
page_title: "Equinix Metal: packet_organization"
subcategory: ""
description: |-
Provides a Packet Organization datasource. This can be used to read existing Organizations.
Provides an Equinix Metal Organization datasource. This can be used to read existing Organizations.
---

# packet_organization

Provides a Packet organization datasource.
Provides an Equinix Metal organization datasource.

## Example Usage

Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/precreated_ip_block.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
page_title: "Packet: precreated_ip_block"
page_title: "Equinix Metal: precreated_ip_block"
subcategory: ""
description: |-
Load automatically created IP blocks from your Packet project
Load automatically created IP blocks from your Equinix Metal project
---

# packet\_precreated\_ip\_block

Use this data source to get CIDR expression for precreated IPv6 and IPv4 blocks in Packet.
Use this data source to get CIDR expression for precreated IPv6 and IPv4 blocks in Equinix Metal.
You can then use the cidrsubnet TF builtin function to derive subnets.

## Example Usage
Expand Down
12 changes: 6 additions & 6 deletions docs/data-sources/project.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
page_title: "Packet: packet_project"
page_title: "Equinix Metal: packet_project"
subcategory: ""
description: |-
Provides a Packet Project datasource.
Provides an Equinix Metal Project datasource.
---

# packet\_project
Expand Down Expand Up @@ -38,13 +38,13 @@ The following attributes are exported:
* `backend_transfer` - Whether Backend Transfer is enabled for this project
* `created` - The timestamp for when the project was created
* `updated` - The timestamp for the last time the project was updated
* `user_ids` - List of UUIDs of user accounts which beling to this project
* `bgp_config` - Optional BGP settings. Refer to [Packet guide for BGP](https://www.packet.com/developers/docs/network/advanced/local-and-global-bgp/).
* `user_ids` - List of UUIDs of user accounts which belong to this project
* `bgp_config` - Optional BGP settings. Refer to [Equinix Metal guide for BGP](https://metal.equinix.com/developers/docs/networking/local-global-bgp/).

The `bgp_config` block contains:

* `asn` - Autonomous System Numer for local BGP deployment
* `asn` - Autonomous System Number for local BGP deployment
* `md5` - Password for BGP session in plaintext (not a checksum)
* `deployment_type` - `private` or `public`, the `private` is likely to be usable immediately, the `public` will need to be review by Packet engineers
* `deployment_type` - `private` or `public`, the `private` is likely to be usable immediately, the `public` will need to be review by Equinix Metal engineers
* `status` - status of BGP configuration in the project
* `max_prefix` - The maximum number of route filters allowed per server
10 changes: 5 additions & 5 deletions docs/data-sources/project_ssh_key.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
page_title: "Packet: packet_project_ssh_key"
page_title: "Equinix Metal: packet_project_ssh_key"
subcategory: ""
description: |-
Provides a Packet Project SSH Key datasource.
Provides an Equinix Metal Project SSH Key datasource.
---

# packet\_project\_ssh\_key
Expand All @@ -24,9 +24,9 @@ data "packet_project_ssh_key" "my_key" {
The following arguments are supported:

* `search` - (Optional) The name, fingerprint, or public_key of the SSH Key to search for
in the Packet project
* `id` - (Optional) The id of the SSH Key to search for in the Packet project
* `project_id` - The Packet project id of the Packet SSH Key
in the Equinix Metal project
* `id` - (Optional) The id of the SSH Key to search for in the Equinix Metal project
* `project_id` - The Equinix Metal project id of the Equinix Metal SSH Key

One of either `search` or `id` must be provided along with `project_id`.

Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/spot_market_price.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
page_title: "Packet: spot_market_price"
page_title: "Equinix Metal: spot_market_price"
subcategory: ""
description: |-
Get a Packet Spot Market Price
Get an Equinix Metal Spot Market Price
---

# packet\_operating\_system

Use this data source to get Packet Spot Market Price.
Use this data source to get Equinix Metal Spot Market Price.

## Example Usage

Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/spot_market_request.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
page_title: "Packet: packet_spot_market_request"
page_title: "Equinix Metal: packet_spot_market_request"
subcategory: ""
description: |-
Provides a datasource for existing Spot Market Requests in the Packet host.
Provides a datasource for existing Spot Market Requests in the Equinix Metal host.
---

# packet_spot_market_request

Provides a Packet spot_market_request datasource. The datasource will contain list of device IDs created by referenced Spot Market Request.
Provides an Equinix Metal spot_market_request datasource. The datasource will contain list of device IDs created by referenced Spot Market Request.

## Example Usage

Expand Down
8 changes: 4 additions & 4 deletions docs/data-sources/volume.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
page_title: "Packet: packet_volume"
page_title: "Equinix Metal: packet_volume"
subcategory: ""
description: |-
Provides a Packet Block Storage Volume Datasource.
Provides an Equinix Metal Block Storage Volume Datasource.
---

# packet\_volume

Provides a Packet Block Storage Volume datasource to allow you to read existing volumes.
Provides an Equinix Metal Block Storage Volume datasource to allow you to read existing volumes.

## Example Usage

Expand All @@ -29,7 +29,7 @@ The following arguments are supported:

* `volume_id` ID of volume for lookup
* `name` - Name of volume for lookup
* `project_id` - The ID the parent Packet project (for lookup by name)
* `project_id` - The ID the parent Equinix Metal project (for lookup by name)

Either `volume_id` or both `project_id` and `name` must be specified.

Expand Down
18 changes: 9 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
layout: ""
page_title: "Provider: Packet"
page_title: "Provider: Equinix Metal"
description: |-
The Packet provider is used to interact with the Packet Host API.
The Equinix Metal provider is used to interact with the Equinix Metal Host API.
---

# Packet Provider
# Equinix Metal Provider

The Packet provider is used to interact with the resources supported by Packet.
[Packet is now Equinix Metal!](https://blog.equinix.com/blog/2020/10/06/equinix-metal-metal-and-more/)

The Equinix Metal (`packet`) provider is used to interact with the resources supported by [Equinix Metal](https://metal.equinix.com/).
The provider needs to be configured with the proper credentials before it can be used.

Use the navigation to the left to read about the available resources.

Be cautious when using the `packet_project` resource. Packet is invoicing per project, so creating many new projects will cause your Packet bill to fragment. If you want to keep your Packet bill simple, please re-use your existing projects.

## Example Usage

```hcl
# Configure the Packet Provider.
# Configure the Equinix Metal Provider.
provider "packet" {
auth_token = var.auth_token
}
# Declare your project ID
#
# You can find ID of your project form the URL in the Packet web app.
# You can find ID of your project form the URL in the Equinix Metal web app.
# For example, if you see your devices listed at
# https://app.packet.net/projects/352000fb2-ee46-4673-93a8-de2c2bdba33b
# .. then 352000fb2-ee46-4673-93a8-de2c2bdba33b is your project ID.
Expand Down Expand Up @@ -56,5 +56,5 @@ resource "packet_device" "web1" {

The following arguments are supported:

* `auth_token` - (Required) This is your Packet API Auth token. This can also be specified
* `auth_token` - (Required) This is your Equinix Metal API Auth token. This can also be specified
with the `PACKET_AUTH_TOKEN` shell environment variable.
Loading

0 comments on commit e702f46

Please sign in to comment.