Skip to content

Commit

Permalink
Rename provider to terraform-provider-astro (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandyliu authored Apr 24, 2024
1 parent b5bb9ff commit bbc624e
Show file tree
Hide file tree
Showing 103 changed files with 908 additions and 895 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: ''
assignees: ''
---

- [ ] I have checked that a similar [feature request](https://github.com/astronomer/astronomer-terraform-provider/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist.
- [ ] I have checked that a similar [feature request](https://github.com/astronomer/terraform-provider-astro/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist.

**✍️ Is your feature request related to a problem? Please describe.**

Expand Down
2 changes: 1 addition & 1 deletion .terraformrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
provider_installation {
dev_overrides {
"registry.terraform.io/astronomer/astronomer" = "~/astronomer/astronomer-terraform-provider/bin"
"registry.terraform.io/astronomer/astro" = "~/astronomer/terraform-provider-astro/bin"
}
direct {}
}
32 changes: 31 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
TODO
Licensed under the Apache License, Version 2.0 (the "License") modified with
Commons Clause Restriction; you may not use this code except in compliance with
the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

"Commons Clause" License Condition v1.0

The Software is provided to you by the Licensor under the License, as defined
below, subject to the following condition.

Without limiting other conditions in the License, the grant of rights under the
License will not include, and the License does not grant to you, the right to
Sell the Software.

For purposes of the foregoing, "Sell" means practicing any or all of the rights
granted to you under the License to provide to third parties, for a fee or other
consideration (including without limitation fees for hosting or
consulting/support services related to the Software), a product or service whose
value derives, entirely or substantially, from the functionality of the
Software. Any license notice or attribution required by the License must also
include this Commons Clause License Condition notice.

Software: Terraform Provider Astro
License: Apache 2.0
Licensor: Astronomer, Inc.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dep:

.PHONY: build
build:
go build -o ${ENVTEST_ASSETS_DIR}/terraform-provider-astronomer
go build -o ${ENVTEST_ASSETS_DIR}
go generate ./...

.PHONY: api_client_gen
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Astronomer Terraform Provider
# Terraform Provider Astro

## Requirements

Expand Down Expand Up @@ -38,13 +38,13 @@ Then commit the changes to `go.mod` and `go.sum`.
```terraform
terraform {
required_providers {
astronomer = {
source = "registry.terraform.io/astronomer/astronomer"
astro = {
source = "registry.terraform.io/astronomer/astro"
}
}
}
provider "astronomer" {
provider "astro" {
organization_id = "<cuid>"
}
Expand All @@ -71,7 +71,7 @@ To run terraform with the provider, create a `.terraformrc` file in your home di
```hcl
provider_installation {
dev_overrides {
"registry.terraform.io/astronomer/astronomer" = "~/astronomer-terraform-provider/bin" # Your path to the provider binary
"registry.terraform.io/astronomer/astro" = "~/terraform-provider-astro/bin" # Your path to the provider binary
}
direct {}
}
Expand All @@ -81,49 +81,49 @@ provider_installation {
```terraform
terraform {
required_providers {
astronomer = {
source = "registry.terraform.io/astronomer/astronomer"
astro = {
source = "registry.terraform.io/astronomer/astro"
}
}
}
# provider configuration
provider "astronomer" {
provider "astro" {
organization_id = "<cuid>"
host = "https://api.astronomer-dev.io"
}
# get information on an existing workspace
data "astronomer_workspace" "example" {
id = "<cuid>>"
data "astro_workspace" "example" {
id = "<cuid>"
}
# output the workspace data to the terminal
output "data_workspace_example" {
value = data.astronomer_workspace.example
value = data.astro_workspace.example
}
# create a new workspace
resource "astronomer_workspace" "tf_workspace" {
resource "astro_workspace" "tf_workspace" {
name = "my workspace"
description = "my first workspace"
cicd_enforced_default = false
}
# output the newly created workspace resource to the terminal
output "terraform_workspace" {
value = astronomer_workspace.tf_workspace
value = astro_workspace.tf_workspace
}
# create a new cluster resource
resource "astronomer_cluster" "tf_cluster" {
resource "astro_cluster" "tf_cluster" {
type = "DEDICATED"
name = "my first cluster"
region = "us-east-1"
cloud_provider = "AWS"
db_instance_type = "db.m6g.large"
vpc_subnet_range = "172.20.0.0/20"
workspace_ids = [astronomer_workspace.tf_workspace.id, data.astronomer_workspace.example.id]
workspace_ids = [astro_workspace.tf_workspace.id, data.astro_workspace.example.id]
timeouts = {
create = "3h"
update = "2h"
Expand All @@ -132,10 +132,10 @@ resource "astronomer_cluster" "tf_cluster" {
}
# create a new dedicated deployment resource in that cluster
resource "astronomer_deployment" "tf_deployment" {
resource "astro_deployment" "tf_dedicated_deployment" {
name = "my first dedicated deployment"
description = ""
cluster_id = astronomer_cluster.tf_cluster.id
cluster_id = astro_cluster.tf_cluster.id
type = "DEDICATED"
contact_emails = ["[email protected]"]
default_task_pod_cpu = "0.25"
Expand All @@ -148,7 +148,7 @@ resource "astronomer_deployment" "tf_deployment" {
resource_quota_cpu = "10"
resource_quota_memory = "20Gi"
scheduler_size = "SMALL"
workspace_id = astronomer_workspace.tf_workspace.id
workspace_id = astro_workspace.tf_workspace.id
environment_variables = [{
key = "key1"
value = "value1"
Expand All @@ -157,7 +157,7 @@ resource "astronomer_deployment" "tf_deployment" {
}
# create a new standard deployment resource
resource "astronomer_standard_deployment" "tf_standard_deployment" {
resource "astro_deployment" "tf_standard_deployment" {
name = "my first standard deployment"
description = ""
type = "STANDARD"
Expand All @@ -174,7 +174,7 @@ resource "astronomer_standard_deployment" "tf_standard_deployment" {
resource_quota_cpu = "10"
resource_quota_memory = "20Gi"
scheduler_size = "SMALL"
workspace_id = astronomer_workspace.tf_workspace.id
workspace_id = astro_workspace.tf_workspace.id
environment_variables = []
worker_queues = [{
name = "default"
Expand Down
16 changes: 8 additions & 8 deletions docs/data-sources/cluster.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "astronomer_cluster Data Source - astronomer"
page_title: "astro_cluster Data Source - astro"
subcategory: ""
description: |-
Cluster data source
---

# astronomer_cluster (Data Source)
# astro_cluster (Data Source)

Cluster data source

## Example Usage

```terraform
data "astronomer_cluster" "example" {
data "astro_cluster" "example" {
id = "clozc036j01to01jrlgvueo8t"
}
```
Expand All @@ -33,26 +33,26 @@ data "astronomer_cluster" "example" {
- `is_limited` (Boolean) Whether the cluster is limited
- `metadata` (Attributes) Cluster metadata (see [below for nested schema](#nestedatt--metadata))
- `name` (String) Cluster name
- `node_pools` (Attributes List) Cluster node pools (see [below for nested schema](#nestedatt--node_pools))
- `node_pools` (Attributes Set) Cluster node pools (see [below for nested schema](#nestedatt--node_pools))
- `pod_subnet_range` (String) Cluster pod subnet range
- `provider_account` (String) Cluster provider account
- `region` (String) Cluster region
- `service_peering_range` (String) Cluster service peering range
- `service_subnet_range` (String) Cluster service subnet range
- `status` (String) Cluster status
- `tags` (Attributes List) Cluster tags (see [below for nested schema](#nestedatt--tags))
- `tags` (Attributes Set) Cluster tags (see [below for nested schema](#nestedatt--tags))
- `tenant_id` (String) Cluster tenant ID
- `type` (String) Cluster type
- `updated_at` (String) Cluster last updated timestamp
- `vpc_subnet_range` (String) Cluster VPC subnet range
- `workspace_ids` (List of String) Cluster workspace IDs
- `workspace_ids` (Set of String) Cluster workspace IDs

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

Read-Only:

- `external_ips` (List of String) Cluster external IPs
- `external_ips` (Set of String) Cluster external IPs
- `oidc_issuer_url` (String) Cluster OIDC issuer URL


Expand All @@ -69,7 +69,7 @@ Read-Only:
- `max_node_count` (Number) Node pool maximum node count
- `name` (String) Node pool name
- `node_instance_type` (String) Node pool node instance type
- `supported_astro_machines` (List of String) Node pool supported Astro machines
- `supported_astro_machines` (Set of String) Node pool supported Astro machines
- `updated_at` (String) Node pool last updated timestamp


Expand Down
20 changes: 10 additions & 10 deletions docs/data-sources/cluster_options.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "astronomer_cluster_options Data Source - astronomer"
page_title: "astro_cluster_options Data Source - astro"
subcategory: ""
description: |-
ClusterOptions data source
---

# astronomer_cluster_options (Data Source)
# astro_cluster_options (Data Source)

ClusterOptions data source

## Example Usage

```terraform
data "astronomer_cluster_options" "example_cluster_options" {
data "astro_cluster_options" "example_cluster_options" {
type = "HYBRID"
}
data "astronomer_cluster_options" "example_cluster_options_filter_by_provider" {
data "astro_cluster_options" "example_cluster_options_filter_by_provider" {
type = "HYBRID"
cloud_provider = "AWS"
}
Expand All @@ -36,14 +36,14 @@ data "astronomer_cluster_options" "example_cluster_options_filter_by_provider" {

### Read-Only

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

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

Read-Only:

- `database_instances` (Attributes List) ClusterOption database instances (see [below for nested schema](#nestedatt--cluster_options--database_instances))
- `database_instances` (Attributes Set) ClusterOption database instances (see [below for nested schema](#nestedatt--cluster_options--database_instances))
- `default_database_instance` (Attributes) ClusterOption default database instance (see [below for nested schema](#nestedatt--cluster_options--default_database_instance))
- `default_node_instance` (Attributes) ClusterOption default node instance (see [below for nested schema](#nestedatt--cluster_options--default_node_instance))
- `default_pod_subnet_range` (String) ClusterOption default pod subnet range
Expand All @@ -54,9 +54,9 @@ Read-Only:
- `node_count_default` (Number) ClusterOption node count default
- `node_count_max` (Number) ClusterOption node count max
- `node_count_min` (Number) ClusterOption node count min
- `node_instances` (Attributes List) ClusterOption node instances (see [below for nested schema](#nestedatt--cluster_options--node_instances))
- `node_instances` (Attributes Set) ClusterOption node instances (see [below for nested schema](#nestedatt--cluster_options--node_instances))
- `provider` (String) ClusterOption provider
- `regions` (Attributes List) ClusterOption regions (see [below for nested schema](#nestedatt--cluster_options--regions))
- `regions` (Attributes Set) ClusterOption regions (see [below for nested schema](#nestedatt--cluster_options--regions))

<a id="nestedatt--cluster_options--database_instances"></a>
### Nested Schema for `cluster_options.database_instances`
Expand Down Expand Up @@ -93,7 +93,7 @@ Read-Only:

Read-Only:

- `banned_instances` (List of String) Region banned instances
- `banned_instances` (Set of String) Region banned instances
- `limited` (Boolean) Region is limited bool
- `name` (String) Region is limited bool

Expand All @@ -113,6 +113,6 @@ Read-Only:

Read-Only:

- `banned_instances` (List of String) Region banned instances
- `banned_instances` (Set of String) Region banned instances
- `limited` (Boolean) Region is limited bool
- `name` (String) Region is limited bool
Loading

0 comments on commit bbc624e

Please sign in to comment.