Skip to content

Commit

Permalink
added initial commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlapao committed Nov 22, 2023
1 parent 5525452 commit 40a63bb
Show file tree
Hide file tree
Showing 54 changed files with 1,109 additions and 948 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ website/vendor
*.winfile eol=crlf

terraform-provider-*
.local/
.local/
File renamed without changes.
396 changes: 21 additions & 375 deletions LICENSE

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Terraform Provider Scaffolding (Terraform Plugin Framework)
# Terraform Provider for Parallels Desktop

_This template repository is built on the [Terraform Plugin Framework](https://github.com/hashicorp/terraform-plugin-framework). The template repository built on the [Terraform Plugin SDK](https://github.com/hashicorp/terraform-plugin-sdk) can be found at [terraform-provider-scaffolding](https://github.com/hashicorp/terraform-provider-scaffolding). See [Which SDK Should I Use?](https://developer.hashicorp.com/terraform/plugin/framework-benefits) in the Terraform documentation for additional information._
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![](https://dcbadge.vercel.app/api/server/pEwZ254C3d?style=flat&theme=default)](https://discord.gg/pEwZ254C3d)
[![Release](https://github.com/Parallels/terraform-provider-parallels/actions/workflows/release.yml/badge.svg)](https://github.com/Parallels/terraform-provider-parallels/actions/workflows/release.yml)
[![Tests](https://github.com/Parallels/terraform-provider-parallels/actions/workflows/test.yml/badge.svg)](https://github.com/Parallels/terraform-provider-parallels/actions/workflows/test.yml)

This repository is a *template* for a [Terraform](https://www.terraform.io) provider. It is intended as a starting point for creating Terraform providers, containing:
<img src="https://raw.githubusercontent.com/hashicorp/terraform-website/master/public/img/logo-hashicorp.svg" width="600px">

- A resource and a data source (`internal/provider/`),
- Examples (`examples/`) and generated documentation (`docs/`),
- Miscellaneous meta files.
## Maintainers

These files contain boilerplate code that you will need to edit to create your own Terraform provider. Tutorials for creating Terraform providers can be found on the [HashiCorp Developer](https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework) platform. _Terraform Plugin Framework specific guides are titled accordingly._
This provider plugin is maintained by Linode and the community, please check the [Code of Conduct](./CODE_OF_CONDUCT.md) if you want to participate.

Please see the [GitHub template repository documentation](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template) for how to create a new repository from this template on GitHub.

Once you've written your provider, you'll want to [publish it on the Terraform Registry](https://developer.hashicorp.com/terraform/registry/providers/publishing) so that others can use it.

## Requirements

Expand Down Expand Up @@ -45,7 +43,7 @@ Then commit the changes to `go.mod` and `go.sum`.

## Using the provider

Fill this in for each provider
Check the latest examples in the terraform registry [here](https://registry.terraform.io/providers/Parallels/parallels/latest/docs).

## Developing the Provider

Expand Down
5 changes: 5 additions & 0 deletions docker_compose/conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"db_connection": "host=db port=5432 user=postgres password=password dbname=products sslmode=disable",
"bind_address": "0.0.0.0:9090",
"metrics_address": "localhost:9102"
}
20 changes: 20 additions & 0 deletions docker_compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.7'
services:
api:
image: "hashicorpdemoapp/product-api:v0.0.22"
ports:
- "19090:9090"
volumes:
- ./conf.json:/config/config.json
environment:
CONFIG_FILE: '/config/config.json'
depends_on:
- db
db:
image: "hashicorpdemoapp/product-api-db:v0.0.22"
ports:
- "15432:5432"
environment:
POSTGRES_DB: 'products'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'password'
66 changes: 0 additions & 66 deletions docs/data-sources/parallels-desktop_packer_template.md

This file was deleted.

65 changes: 0 additions & 65 deletions docs/data-sources/parallels-desktop_vm.md

This file was deleted.

76 changes: 76 additions & 0 deletions docs/data-sources/vm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "parallels-desktop_vm Data Source - terraform-provider-parallels-desktop"
subcategory: ""
description: |-
Virtual Machine Data Source
---

# parallels-desktop_vm (Data Source)

Virtual Machine Data Source

## Example Usage

```terraform
data "parallels-desktop_vm" "example" {
host = "http://example.com:8080"
filter {
field_name = "name"
value = "exampe-vm"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `host` (String)

### Optional

- `authenticator` (Block, Optional) Authenticator block, this is used to authenticate with the Parallels Desktop API, if empty it will try to use the root password (see [below for nested schema](#nestedblock--authenticator))
- `filter` (Block, Optional) Filter block, this is used to filter data sources (see [below for nested schema](#nestedblock--filter))

### Read-Only

- `machines` (Attributes List) (see [below for nested schema](#nestedatt--machines))

<a id="nestedblock--authenticator"></a>
### Nested Schema for `authenticator`

Optional:

- `api_key` (String, Sensitive) Parallels desktop API API Key
- `password` (String, Sensitive) Parallels desktop API Password
- `username` (String) Parallels desktop API Username


<a id="nestedblock--filter"></a>
### Nested Schema for `filter`

Required:

- `field_name` (String) The field name of the datasource where you want to filter.
- `value` (String) The value you want to filter, this can be a regular expression.

Optional:

- `case_insensitive` (Boolean) Case insensitive, if true the filter will be case insensitive.


<a id="nestedatt--machines"></a>
### Nested Schema for `machines`

Read-Only:

- `description` (String)
- `home` (String)
- `host_ip` (String)
- `id` (String)
- `name` (String)
- `os_type` (String)
- `state` (String)
18 changes: 9 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "hashicups Provider"
page_title: "parallels-desktop Provider"
subcategory: ""
description: |-
Parallels Desktop provider
---

# hashicups Provider

# parallels-desktop Provider

Parallels Desktop provider

## Example Usage

```terraform
provider "scaffolding" {
# example configuration here
provider "parallels-desktop" {
license = "xxxx-xxxx-xxxx-xxxx"
}
```

Expand All @@ -23,9 +23,9 @@ provider "scaffolding" {

### Required

- `license` (String, Sensitive)
- `license` (String, Sensitive) Parallels Desktop Pro or Business license

### Optional

- `my_account_password` (String, Sensitive)
- `my_account_user` (String)
- `my_account_password` (String, Sensitive) Parallels Desktop My Account password
- `my_account_user` (String) Parallels Desktop My Account user
Loading

0 comments on commit 40a63bb

Please sign in to comment.