Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update provider from latest OpenAPI spec #78

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
10 changes: 10 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
default: testacc

.PHONY: lint
lint:
golangci-lint run -v ./...

# Run acceptance tests
.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m

.PHONY: generate
generate:
bash ./script/update_openapi_spec
bash ./script/generate
go generate ./...
2 changes: 1 addition & 1 deletion docs/data-sources/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ output "backup" {
- `actor` (Attributes) The actor that created the backup. (see [below for nested schema](#nestedatt--actor))
- `backup_policy` (Attributes) The backup policy being followed. (see [below for nested schema](#nestedatt--backup_policy))
- `created_at` (String) When the backup was created.
- `estimated_storage_cost` (String) The estimated storage cost of the backup.
- `estimated_storage_cost` (Number) The estimated storage cost of the backup.
- `name` (String) The name of the backup.
- `required` (Boolean) Whether or not the backup policy is required.
- `restored_branches` (List of String) Branches that have been restored with this backup.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Read-Only:
- `branch` (String) The branch this backup belongs to.
- `created_at` (String) When the backup was created.
- `database` (String) The database this backup belongs to.
- `estimated_storage_cost` (String) The estimated storage cost of the backup.
- `estimated_storage_cost` (Number) The estimated storage cost of the backup.
- `id` (String) The ID of the backup.
- `name` (String) The name of the backup.
- `organization` (String) The organization this backup belongs to.
Expand Down
3 changes: 0 additions & 3 deletions docs/data-sources/organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ output "org" {

### Read-Only

- `admin_only_production_access` (Boolean) Whether or not only administrators can access production branches in the organization.
- `billing_email` (String) The billing email of the organization.
- `can_create_databases` (Boolean) Whether or not more databases can be created in the organization.
- `created_at` (String) When the organization was created.
- `database_count` (Number) The number of databases in the organization.
- `features` (Attributes) Features that are enabled on the organization. (see [below for nested schema](#nestedatt--features))
- `flags` (Attributes) . (see [below for nested schema](#nestedatt--flags))
- `free_databases_remaining` (Number) The number of remaining free databases that can be created in the organization.
- `has_past_due_invoices` (Boolean) Whether or not the organization has past due billing invoices.
- `id` (String) The ID for the organization.
- `idp_managed_roles` (Boolean) Whether or not the IdP provider is be responsible for managing roles in PlanetScale.
Expand Down
3 changes: 0 additions & 3 deletions docs/data-sources/organizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ output "orgs" {

Read-Only:

- `admin_only_production_access` (Boolean) Whether or not only administrators can access production branches in the organization.
- `billing_email` (String) The billing email of the organization.
- `can_create_databases` (Boolean) Whether or not more databases can be created in the organization.
- `created_at` (String) When the organization was created.
- `database_count` (Number) The number of databases in the organization.
- `features` (Attributes) Features that are enabled on the organization. (see [below for nested schema](#nestedatt--organizations--features))
- `flags` (Attributes) . (see [below for nested schema](#nestedatt--organizations--flags))
- `free_databases_remaining` (Number) The number of remaining free databases that can be created in the organization.
- `has_past_due_invoices` (Boolean) Whether or not the organization has past due billing invoices.
- `id` (String) The ID for the organization.
- `idp_managed_roles` (Boolean) Whether or not the IdP provider is be responsible for managing roles in PlanetScale.
Expand Down
13 changes: 12 additions & 1 deletion docs/data-sources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ output "current_user" {

- `avatar_url` (String) The URL source of the user's avatar.
- `created_at` (String) When the user was created.
- `default_organization_id` (String) The default organization for the user.
- `default_organization` (Attributes) The default organization for the user. (see [below for nested schema](#nestedatt--default_organization))
- `directory_managed` (Boolean) Whether or not the user is managed by a WorkOS directory.
- `display_name` (String) The display name of the user.
- `email` (String) The email of the user.
Expand All @@ -45,3 +45,14 @@ output "current_user" {
- `sso` (Boolean) Whether or not the user is managed by WorkOS.
- `two_factor_auth_configured` (Boolean) Whether or not the user has configured two factor authentication.
- `updated_at` (String) When the user was last updated.

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

Read-Only:

- `created_at` (String) When the organization was created.
- `deleted_at` (String) When the organization was last deleted.
- `id` (String) The ID of the organization.
- `name` (String) The name of the organization.
- `updated_at` (String) When the organization was last updated.
26 changes: 14 additions & 12 deletions docs/resources/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,36 @@ resource "planetscale_backup" "example" {

### Required

- `backup_policy` (Attributes) The policy used by the backup. (see [below for nested schema](#nestedatt--backup_policy))
- `branch` (String) The branch being backed up.
- `database` (String) The database to which the branch being backed up belongs to.
- `name` (String) The name of the backup.
- `organization` (String) The organization in which the database branch being backed up belongs to.
- `retention_unit` (String) The unit for the retention period of the backup policy.
- `retention_value` (Number) A number value for the retention period of the backup policy.

### Read-Only

- `actor` (Attributes) . (see [below for nested schema](#nestedatt--actor))
- `backup_policy` (Attributes) The policy used by the backup. (see [below for nested schema](#nestedatt--backup_policy))
- `created_at` (String) When the backup was created.
- `estimated_storage_cost` (String) The estimated storage cost of the backup.
- `estimated_storage_cost` (Number) The estimated storage cost of the backup.
- `id` (String) The ID of the backup.
- `required` (Boolean) Whether or not the backup policy is required.
- `restored_branches` (List of String) Branches that have been restored with this backup.
- `size` (Number) The size of the backup.
- `state` (String) The current state of the backup.
- `updated_at` (String) When the backup was last updated.

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

Read-Only:

- `avatar_url` (String) The URL of the actor's avatar
- `display_name` (String) The name of the actor
- `id` (String) The ID of the actor


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

Expand All @@ -74,13 +86,3 @@ Read-Only:
- `schedule_week` (String) Week of the month that the backup is scheduled.
- `target` (String) Whether the backup policy is for a production or development database, or for a database branch.
- `updated_at` (String) When the backup policy was last updated.


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

Read-Only:

- `avatar_url` (String) The URL of the actor's avatar
- `display_name` (String) The name of the actor
- `id` (String) The ID of the actor
2 changes: 0 additions & 2 deletions docs/resources/branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ resource "planetscale_branch" "example" {

### Read-Only

- `access_host_url` (String) The access host URL for the branch. This is a legacy field, use `mysql_edge_address`.
- `actor` (Attributes) The actor who created this branch. (see [below for nested schema](#nestedatt--actor))
- `cluster_rate_name` (String) The SKU representing the branch's cluster size.
- `created_at` (String) When the branch was created.
- `html_url` (String) Planetscale app URL for the branch.
- `id` (String) The ID of the branch.
- `initial_restore_id` (String) The ID of the backup from which the branch was restored.
- `mysql_address` (String) The MySQL address for the branch.
- `mysql_edge_address` (String) The address of the MySQL provider for the branch.
- `ready` (Boolean) Whether or not the branch is ready to serve queries.
Expand Down
Loading