Skip to content

Commit

Permalink
Deployments data source (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandyliu authored Apr 10, 2024
1 parent 5c6a204 commit a21650c
Show file tree
Hide file tree
Showing 29 changed files with 1,849 additions and 129 deletions.
8 changes: 8 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
echo "Running pre-commit hook"
make fmt
make build
go generate ./...
# Add examples and docs files to git after documentation is generated
git add examples/
git add docs/
echo "Pre-commit hook finished"
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ validate-fmt:

.PHONY: dep
dep:
git config core.hooksPath .githooks
go mod download
go install golang.org/x/tools/cmd/goimports
go mod tidy
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ If you wish to work on the provider, you'll first need [Go](http://www.golang.or

To compile the provider, see [Building The Provider](## Building The Provider).

To run terraform with the provider, create a `.terraformrc` file in your home directory with the following content to override the provider installation with the local build:
To add example docs, add the correspond `.tf` files to the `examples` directory.

To run terraform with the provider, create a `.terraformrc` file in your home directory (`~`) with the following content to override the provider installation with the local build:

```hcl
provider_installation {
Expand Down
189 changes: 189 additions & 0 deletions docs/data-sources/deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "astronomer_deployment Data Source - astronomer"
subcategory: ""
description: |-
Deployment data source
---

# astronomer_deployment (Data Source)

Deployment data source

## Example Usage

```terraform
data "astronomer_deployment" "example" {
id = "clozc036j01to01jrlgvueo8t"
}
```

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

### Required

- `id` (String) Deployment identifier

### Read-Only

- `airflow_version` (String) Deployment Airflow version
- `astro_runtime_version` (String) Deployment Astro Runtime version
- `cloud_provider` (String) Deployment cloud provider
- `cluster_id` (String) Deployment cluster identifier
- `contact_emails` (List of String) Deployment contact emails
- `created_at` (String) Deployment creation timestamp
- `created_by` (Attributes) Deployment creator (see [below for nested schema](#nestedatt--created_by))
- `dag_tarball_version` (String) Deployment DAG tarball version
- `default_task_pod_cpu` (String) Deployment default task pod CPU
- `default_task_pod_memory` (String) Deployment default task pod memory
- `description` (String) Deployment description
- `desired_dag_tarball_version` (String) Deployment desired DAG tarball version
- `environment_variables` (Attributes List) Deployment environment variables (see [below for nested schema](#nestedatt--environment_variables))
- `executor` (String) Deployment executor
- `external_ips` (List of String) Deployment external IPs
- `image_repository` (String) Deployment image repository
- `image_tag` (String) Deployment image tag
- `image_version` (String) Deployment image version
- `is_cicd_enforced` (Boolean) Whether the Deployment enforces CI/CD deploys
- `is_dag_deploy_enabled` (Boolean) Whether DAG deploy is enabled
- `is_development_mode` (Boolean) Whether Deployment is in development mode
- `is_high_availability` (Boolean) Whether Deployment has high availability
- `name` (String) Deployment name
- `namespace` (String) Deployment namespace
- `oidc_issuer_url` (String) Deployment OIDC issuer URL
- `region` (String) Deployment region
- `resource_quota_cpu` (String) Deployment resource quota CPU
- `resource_quota_memory` (String) Deployment resource quota memory
- `scaling_spec` (Attributes) Deployment scaling spec (see [below for nested schema](#nestedatt--scaling_spec))
- `scaling_status` (Attributes) Deployment scaling status (see [below for nested schema](#nestedatt--scaling_status))
- `scheduler_au` (Number) Deployment scheduler AU
- `scheduler_cpu` (String) Deployment scheduler CPU
- `scheduler_memory` (String) Deployment scheduler memory
- `scheduler_replicas` (Number) Deployment scheduler replicas
- `scheduler_size` (String) Deployment scheduler size
- `status` (String) Deployment status
- `status_reason` (String) Deployment status reason
- `task_pod_node_pool_id` (String) Deployment task pod node pool identifier
- `type` (String) Deployment type
- `updated_at` (String) Deployment last updated timestamp
- `updated_by` (Attributes) Deployment updater (see [below for nested schema](#nestedatt--updated_by))
- `webserver_airflow_api_url` (String) Deployment webserver Airflow API URL
- `webserver_cpu` (String) Deployment webserver CPU
- `webserver_ingress_hostname` (String) Deployment webserver ingress hostname
- `webserver_memory` (String) Deployment webserver memory
- `webserver_replicas` (Number) Deployment webserver replicas
- `webserver_url` (String) Deployment webserver URL
- `worker_queues` (Attributes List) Deployment worker queues (see [below for nested schema](#nestedatt--worker_queues))
- `workload_identity` (String) Deployment workload identity
- `workspace_id` (String) Deployment workspace identifier

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

Read-Only:

- `api_token_name` (String)
- `avatar_url` (String)
- `full_name` (String)
- `id` (String)
- `subject_type` (String)
- `username` (String)


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

Read-Only:

- `is_secret` (Boolean) Whether Environment variable is a secret
- `key` (String) Environment variable key
- `updated_at` (String) Environment variable last updated timestamp
- `value` (String) Environment variable value


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

Read-Only:

- `hibernation_spec` (Attributes) (see [below for nested schema](#nestedatt--scaling_spec--hibernation_spec))

<a id="nestedatt--scaling_spec--hibernation_spec"></a>
### Nested Schema for `scaling_spec.hibernation_spec`

Read-Only:

- `override` (Attributes) (see [below for nested schema](#nestedatt--scaling_spec--hibernation_spec--override))
- `schedules` (Attributes List) (see [below for nested schema](#nestedatt--scaling_spec--hibernation_spec--schedules))

<a id="nestedatt--scaling_spec--hibernation_spec--override"></a>
### Nested Schema for `scaling_spec.hibernation_spec.override`

Read-Only:

- `is_active` (Boolean) Whether the override is active
- `is_hibernating` (Boolean) Whether the override is hibernating
- `override_until` (String) Time until the override is active


<a id="nestedatt--scaling_spec--hibernation_spec--schedules"></a>
### Nested Schema for `scaling_spec.hibernation_spec.schedules`

Read-Only:

- `description` (String) Description of the schedule
- `hibernate_at_cron` (String) Cron expression for hibernation
- `is_enabled` (Boolean) Whether the schedule is enabled
- `wake_at_cron` (String) Cron expression for waking




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

Read-Only:

- `hibernation_status` (Attributes) (see [below for nested schema](#nestedatt--scaling_status--hibernation_status))

<a id="nestedatt--scaling_status--hibernation_status"></a>
### Nested Schema for `scaling_status.hibernation_status`

Read-Only:

- `is_hibernating` (Boolean) Whether the deployment is hibernating
- `next_event_at` (String) Time of the next event
- `next_event_type` (String) Type of the next event
- `reason` (String) Reason for the current state



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

Read-Only:

- `api_token_name` (String)
- `avatar_url` (String)
- `full_name` (String)
- `id` (String)
- `subject_type` (String)
- `username` (String)


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

Read-Only:

- `astro_machine` (String) Worker queue Astro machine value
- `id` (String) Worker queue identifier
- `is_default` (Boolean) Whether Worker queue is default
- `max_worker_count` (Number) Worker queue max worker count
- `min_worker_count` (Number) Worker queue min worker count
- `name` (String) Worker queue name
- `node_pool_id` (String) Worker queue node pool identifier
- `pod_cpu` (String) Worker queue pod CPU
- `pod_memory` (String) Worker queue pod memory
- `worker_concurrency` (Number) Worker queue worker concurrency
Loading

0 comments on commit a21650c

Please sign in to comment.