Skip to content

Commit a21650c

Browse files
authored
Deployments data source (#7)
1 parent 5c6a204 commit a21650c

29 files changed

+1849
-129
lines changed

.githooks/pre-commit

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
echo "Running pre-commit hook"
2+
make fmt
3+
make build
4+
go generate ./...
5+
# Add examples and docs files to git after documentation is generated
6+
git add examples/
7+
git add docs/
8+
echo "Pre-commit hook finished"

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ validate-fmt:
3737

3838
.PHONY: dep
3939
dep:
40+
git config core.hooksPath .githooks
4041
go mod download
4142
go install golang.org/x/tools/cmd/goimports
4243
go mod tidy

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ If you wish to work on the provider, you'll first need [Go](http://www.golang.or
6363

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

66-
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:
66+
To add example docs, add the correspond `.tf` files to the `examples` directory.
67+
68+
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:
6769

6870
```hcl
6971
provider_installation {

docs/data-sources/deployment.md

+189
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "astronomer_deployment Data Source - astronomer"
4+
subcategory: ""
5+
description: |-
6+
Deployment data source
7+
---
8+
9+
# astronomer_deployment (Data Source)
10+
11+
Deployment data source
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "astronomer_deployment" "example" {
17+
id = "clozc036j01to01jrlgvueo8t"
18+
}
19+
```
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Required
25+
26+
- `id` (String) Deployment identifier
27+
28+
### Read-Only
29+
30+
- `airflow_version` (String) Deployment Airflow version
31+
- `astro_runtime_version` (String) Deployment Astro Runtime version
32+
- `cloud_provider` (String) Deployment cloud provider
33+
- `cluster_id` (String) Deployment cluster identifier
34+
- `contact_emails` (List of String) Deployment contact emails
35+
- `created_at` (String) Deployment creation timestamp
36+
- `created_by` (Attributes) Deployment creator (see [below for nested schema](#nestedatt--created_by))
37+
- `dag_tarball_version` (String) Deployment DAG tarball version
38+
- `default_task_pod_cpu` (String) Deployment default task pod CPU
39+
- `default_task_pod_memory` (String) Deployment default task pod memory
40+
- `description` (String) Deployment description
41+
- `desired_dag_tarball_version` (String) Deployment desired DAG tarball version
42+
- `environment_variables` (Attributes List) Deployment environment variables (see [below for nested schema](#nestedatt--environment_variables))
43+
- `executor` (String) Deployment executor
44+
- `external_ips` (List of String) Deployment external IPs
45+
- `image_repository` (String) Deployment image repository
46+
- `image_tag` (String) Deployment image tag
47+
- `image_version` (String) Deployment image version
48+
- `is_cicd_enforced` (Boolean) Whether the Deployment enforces CI/CD deploys
49+
- `is_dag_deploy_enabled` (Boolean) Whether DAG deploy is enabled
50+
- `is_development_mode` (Boolean) Whether Deployment is in development mode
51+
- `is_high_availability` (Boolean) Whether Deployment has high availability
52+
- `name` (String) Deployment name
53+
- `namespace` (String) Deployment namespace
54+
- `oidc_issuer_url` (String) Deployment OIDC issuer URL
55+
- `region` (String) Deployment region
56+
- `resource_quota_cpu` (String) Deployment resource quota CPU
57+
- `resource_quota_memory` (String) Deployment resource quota memory
58+
- `scaling_spec` (Attributes) Deployment scaling spec (see [below for nested schema](#nestedatt--scaling_spec))
59+
- `scaling_status` (Attributes) Deployment scaling status (see [below for nested schema](#nestedatt--scaling_status))
60+
- `scheduler_au` (Number) Deployment scheduler AU
61+
- `scheduler_cpu` (String) Deployment scheduler CPU
62+
- `scheduler_memory` (String) Deployment scheduler memory
63+
- `scheduler_replicas` (Number) Deployment scheduler replicas
64+
- `scheduler_size` (String) Deployment scheduler size
65+
- `status` (String) Deployment status
66+
- `status_reason` (String) Deployment status reason
67+
- `task_pod_node_pool_id` (String) Deployment task pod node pool identifier
68+
- `type` (String) Deployment type
69+
- `updated_at` (String) Deployment last updated timestamp
70+
- `updated_by` (Attributes) Deployment updater (see [below for nested schema](#nestedatt--updated_by))
71+
- `webserver_airflow_api_url` (String) Deployment webserver Airflow API URL
72+
- `webserver_cpu` (String) Deployment webserver CPU
73+
- `webserver_ingress_hostname` (String) Deployment webserver ingress hostname
74+
- `webserver_memory` (String) Deployment webserver memory
75+
- `webserver_replicas` (Number) Deployment webserver replicas
76+
- `webserver_url` (String) Deployment webserver URL
77+
- `worker_queues` (Attributes List) Deployment worker queues (see [below for nested schema](#nestedatt--worker_queues))
78+
- `workload_identity` (String) Deployment workload identity
79+
- `workspace_id` (String) Deployment workspace identifier
80+
81+
<a id="nestedatt--created_by"></a>
82+
### Nested Schema for `created_by`
83+
84+
Read-Only:
85+
86+
- `api_token_name` (String)
87+
- `avatar_url` (String)
88+
- `full_name` (String)
89+
- `id` (String)
90+
- `subject_type` (String)
91+
- `username` (String)
92+
93+
94+
<a id="nestedatt--environment_variables"></a>
95+
### Nested Schema for `environment_variables`
96+
97+
Read-Only:
98+
99+
- `is_secret` (Boolean) Whether Environment variable is a secret
100+
- `key` (String) Environment variable key
101+
- `updated_at` (String) Environment variable last updated timestamp
102+
- `value` (String) Environment variable value
103+
104+
105+
<a id="nestedatt--scaling_spec"></a>
106+
### Nested Schema for `scaling_spec`
107+
108+
Read-Only:
109+
110+
- `hibernation_spec` (Attributes) (see [below for nested schema](#nestedatt--scaling_spec--hibernation_spec))
111+
112+
<a id="nestedatt--scaling_spec--hibernation_spec"></a>
113+
### Nested Schema for `scaling_spec.hibernation_spec`
114+
115+
Read-Only:
116+
117+
- `override` (Attributes) (see [below for nested schema](#nestedatt--scaling_spec--hibernation_spec--override))
118+
- `schedules` (Attributes List) (see [below for nested schema](#nestedatt--scaling_spec--hibernation_spec--schedules))
119+
120+
<a id="nestedatt--scaling_spec--hibernation_spec--override"></a>
121+
### Nested Schema for `scaling_spec.hibernation_spec.override`
122+
123+
Read-Only:
124+
125+
- `is_active` (Boolean) Whether the override is active
126+
- `is_hibernating` (Boolean) Whether the override is hibernating
127+
- `override_until` (String) Time until the override is active
128+
129+
130+
<a id="nestedatt--scaling_spec--hibernation_spec--schedules"></a>
131+
### Nested Schema for `scaling_spec.hibernation_spec.schedules`
132+
133+
Read-Only:
134+
135+
- `description` (String) Description of the schedule
136+
- `hibernate_at_cron` (String) Cron expression for hibernation
137+
- `is_enabled` (Boolean) Whether the schedule is enabled
138+
- `wake_at_cron` (String) Cron expression for waking
139+
140+
141+
142+
143+
<a id="nestedatt--scaling_status"></a>
144+
### Nested Schema for `scaling_status`
145+
146+
Read-Only:
147+
148+
- `hibernation_status` (Attributes) (see [below for nested schema](#nestedatt--scaling_status--hibernation_status))
149+
150+
<a id="nestedatt--scaling_status--hibernation_status"></a>
151+
### Nested Schema for `scaling_status.hibernation_status`
152+
153+
Read-Only:
154+
155+
- `is_hibernating` (Boolean) Whether the deployment is hibernating
156+
- `next_event_at` (String) Time of the next event
157+
- `next_event_type` (String) Type of the next event
158+
- `reason` (String) Reason for the current state
159+
160+
161+
162+
<a id="nestedatt--updated_by"></a>
163+
### Nested Schema for `updated_by`
164+
165+
Read-Only:
166+
167+
- `api_token_name` (String)
168+
- `avatar_url` (String)
169+
- `full_name` (String)
170+
- `id` (String)
171+
- `subject_type` (String)
172+
- `username` (String)
173+
174+
175+
<a id="nestedatt--worker_queues"></a>
176+
### Nested Schema for `worker_queues`
177+
178+
Read-Only:
179+
180+
- `astro_machine` (String) Worker queue Astro machine value
181+
- `id` (String) Worker queue identifier
182+
- `is_default` (Boolean) Whether Worker queue is default
183+
- `max_worker_count` (Number) Worker queue max worker count
184+
- `min_worker_count` (Number) Worker queue min worker count
185+
- `name` (String) Worker queue name
186+
- `node_pool_id` (String) Worker queue node pool identifier
187+
- `pod_cpu` (String) Worker queue pod CPU
188+
- `pod_memory` (String) Worker queue pod memory
189+
- `worker_concurrency` (Number) Worker queue worker concurrency

0 commit comments

Comments
 (0)