Skip to content

Commit

Permalink
Update list to set
Browse files Browse the repository at this point in the history
  • Loading branch information
vandyliu committed Apr 23, 2024
1 parent ef72034 commit f57a290
Show file tree
Hide file tree
Showing 35 changed files with 412 additions and 441 deletions.
10 changes: 5 additions & 5 deletions docs/data-sources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,26 @@ data "astro_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
12 changes: 6 additions & 6 deletions docs/data-sources/cluster_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ data "astro_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
14 changes: 7 additions & 7 deletions docs/data-sources/clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ data "astro_clusters" "example_clusters_filter_by_cloud_provider" {
### Optional

- `cloud_provider` (String)
- `names` (List of String)
- `names` (Set of String)

### Read-Only

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

<a id="nestedatt--clusters"></a>
### Nested Schema for `clusters`
Expand All @@ -51,26 +51,26 @@ Read-Only:
- `is_limited` (Boolean) Whether the cluster is limited
- `metadata` (Attributes) Cluster metadata (see [below for nested schema](#nestedatt--clusters--metadata))
- `name` (String) Cluster name
- `node_pools` (Attributes List) Cluster node pools (see [below for nested schema](#nestedatt--clusters--node_pools))
- `node_pools` (Attributes Set) Cluster node pools (see [below for nested schema](#nestedatt--clusters--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--clusters--tags))
- `tags` (Attributes Set) Cluster tags (see [below for nested schema](#nestedatt--clusters--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--clusters--metadata"></a>
### Nested Schema for `clusters.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 @@ -87,7 +87,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
10 changes: 5 additions & 5 deletions docs/data-sources/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ data "astro_deployment" "example" {
- `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
- `contact_emails` (Set 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))
- `environment_variables` (Attributes Set) Deployment environment variables (see [below for nested schema](#nestedatt--environment_variables))
- `executor` (String) Deployment executor
- `external_ips` (List of String) Deployment external IPs
- `external_ips` (Set of String) Deployment external IPs
- `image_repository` (String) Deployment image repository
- `image_tag` (String) Deployment image tag
- `image_version` (String) Deployment image version
Expand Down Expand Up @@ -71,7 +71,7 @@ data "astro_deployment" "example" {
- `webserver_airflow_api_url` (String) Deployment webserver Airflow API URL
- `webserver_ingress_hostname` (String) Deployment webserver ingress hostname
- `webserver_url` (String) Deployment webserver URL
- `worker_queues` (Attributes List) Deployment worker queues (see [below for nested schema](#nestedatt--worker_queues))
- `worker_queues` (Attributes Set) Deployment worker queues (see [below for nested schema](#nestedatt--worker_queues))
- `workload_identity` (String) Deployment workload identity
- `workspace_id` (String) Deployment workspace identifier

Expand Down Expand Up @@ -112,7 +112,7 @@ Read-Only:
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))
- `schedules` (Attributes Set) (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`
Expand Down
10 changes: 5 additions & 5 deletions docs/data-sources/deployment_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ data "astro_deployment_options" "example_with_cloud_provider_query_param" {

### Read-Only

- `executors` (List of String) Available executors
- `executors` (Set of String) Available executors
- `resource_quotas` (Attributes) Resource quota options (see [below for nested schema](#nestedatt--resource_quotas))
- `runtime_releases` (List of Object) Available Astro Runtime versions (see [below for nested schema](#nestedatt--runtime_releases))
- `scheduler_machines` (List of Object) Available scheduler sizes (see [below for nested schema](#nestedatt--scheduler_machines))
- `worker_machines` (List of Object) Available worker machine types (see [below for nested schema](#nestedatt--worker_machines))
- `runtime_releases` (Set of Object) Available Astro Runtime versions (see [below for nested schema](#nestedatt--runtime_releases))
- `scheduler_machines` (Set of Object) Available scheduler sizes (see [below for nested schema](#nestedatt--scheduler_machines))
- `worker_machines` (Set of Object) Available worker machine types (see [below for nested schema](#nestedatt--worker_machines))
- `worker_queues` (Attributes) Available worker queue options (see [below for nested schema](#nestedatt--worker_queues))
- `workload_identity_options` (List of Object) Available workload identity options (see [below for nested schema](#nestedatt--workload_identity_options))
- `workload_identity_options` (Set of Object) Available workload identity options (see [below for nested schema](#nestedatt--workload_identity_options))

<a id="nestedatt--resource_quotas"></a>
### Nested Schema for `resource_quotas`
Expand Down
18 changes: 9 additions & 9 deletions docs/data-sources/deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ data "astro_clusters" "example_clusters_filter_by_cloud_provider" {

### Optional

- `deployment_ids` (List of String)
- `names` (List of String)
- `workspace_ids` (List of String)
- `deployment_ids` (Set of String)
- `names` (Set of String)
- `workspace_ids` (Set of String)

### Read-Only

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

<a id="nestedatt--deployments"></a>
### Nested Schema for `deployments`
Expand All @@ -50,17 +50,17 @@ Read-Only:
- `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
- `contact_emails` (Set of String) Deployment contact emails
- `created_at` (String) Deployment creation timestamp
- `created_by` (Attributes) Deployment creator (see [below for nested schema](#nestedatt--deployments--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--deployments--environment_variables))
- `environment_variables` (Attributes Set) Deployment environment variables (see [below for nested schema](#nestedatt--deployments--environment_variables))
- `executor` (String) Deployment executor
- `external_ips` (List of String) Deployment external IPs
- `external_ips` (Set of String) Deployment external IPs
- `image_repository` (String) Deployment image repository
- `image_tag` (String) Deployment image tag
- `image_version` (String) Deployment image version
Expand Down Expand Up @@ -90,7 +90,7 @@ Read-Only:
- `webserver_airflow_api_url` (String) Deployment webserver Airflow API URL
- `webserver_ingress_hostname` (String) Deployment webserver ingress hostname
- `webserver_url` (String) Deployment webserver URL
- `worker_queues` (Attributes List) Deployment worker queues (see [below for nested schema](#nestedatt--deployments--worker_queues))
- `worker_queues` (Attributes Set) Deployment worker queues (see [below for nested schema](#nestedatt--deployments--worker_queues))
- `workload_identity` (String) Deployment workload identity
- `workspace_id` (String) Deployment workspace identifier

Expand Down Expand Up @@ -131,7 +131,7 @@ Read-Only:
Read-Only:

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

<a id="nestedatt--deployments--scaling_spec--hibernation_spec--override"></a>
### Nested Schema for `deployments.scaling_spec.hibernation_spec.override`
Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ data "astro_workspaces" "example_workspaces_filter_by_names" {

### Optional

- `names` (List of String)
- `workspace_ids` (List of String)
- `names` (Set of String)
- `workspace_ids` (Set of String)

### Read-Only

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

<a id="nestedatt--workspaces"></a>
### Nested Schema for `workspaces`
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "astro_cluster" "gcp_example" {
- `region` (String) Cluster region - if changed, the cluster will be recreated.
- `type` (String) Cluster type
- `vpc_subnet_range` (String) Cluster VPC subnet range. If changed, the cluster will be recreated.
- `workspace_ids` (List of String) Cluster workspace IDs
- `workspace_ids` (Set of String) Cluster workspace IDs

### Optional

Expand All @@ -78,7 +78,7 @@ resource "astro_cluster" "gcp_example" {
- `id` (String) Cluster identifier
- `is_limited` (Boolean) Whether the cluster is limited
- `metadata` (Attributes) Cluster metadata (see [below for nested schema](#nestedatt--metadata))
- `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))
- `provider_account` (String) Cluster provider account
- `status` (String) Cluster status
- `tenant_id` (String) Cluster tenant ID
Expand All @@ -99,7 +99,7 @@ Optional:

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 @@ -116,5 +116,5 @@ 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
11 changes: 5 additions & 6 deletions docs/resources/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ resource "astro_deployment" "hybrid" {

### Required

- `contact_emails` (List of String) Deployment contact emails
- `contact_emails` (Set of String) Deployment contact emails
- `description` (String) Deployment description
- `environment_variables` (Attributes List) Deployment environment variables (see [below for nested schema](#nestedatt--environment_variables))
- `environment_variables` (Attributes Set) Deployment environment variables (see [below for nested schema](#nestedatt--environment_variables))
- `executor` (String) Deployment executor
- `is_cicd_enforced` (Boolean) Deployment CI/CD enforced
- `is_dag_deploy_enabled` (Boolean) Whether DAG deploy is enabled - Changing this value may disrupt your deployment. Read more at https://docs.astronomer.io/astro/deploy-dags#enable-or-disable-dag-only-deploys-on-a-deployment
Expand All @@ -118,7 +118,7 @@ resource "astro_deployment" "hybrid" {
- `scheduler_replicas` (Number) Deployment scheduler replicas - required for 'HYBRID' deployments
- `scheduler_size` (String) Deployment scheduler size - required for 'STANDARD' and 'DEDICATED' deployments
- `task_pod_node_pool_id` (String) Deployment task pod node pool identifier - required if executor is 'KUBERNETES' and type is 'HYBRID'
- `worker_queues` (Attributes List) Deployment worker queues - required for deployments with 'CELERY' executor (see [below for nested schema](#nestedatt--worker_queues))
- `worker_queues` (Attributes Set) Deployment worker queues - required for deployments with 'CELERY' executor (see [below for nested schema](#nestedatt--worker_queues))

### Read-Only

Expand All @@ -128,7 +128,7 @@ resource "astro_deployment" "hybrid" {
- `created_by` (Attributes) Deployment creator (see [below for nested schema](#nestedatt--created_by))
- `dag_tarball_version` (String) Deployment DAG tarball version
- `desired_dag_tarball_version` (String) Deployment desired DAG tarball version
- `external_ips` (List of String) Deployment external IPs
- `external_ips` (Set of String) Deployment external IPs
- `id` (String) Deployment identifier
- `image_repository` (String) Deployment image repository
- `image_tag` (String) Deployment image tag
Expand Down Expand Up @@ -174,7 +174,7 @@ Optional:
Optional:

- `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))
- `schedules` (Attributes Set) (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`
Expand Down Expand Up @@ -223,7 +223,6 @@ Optional:

Read-Only:

- `id` (String) Worker queue identifier
- `pod_cpu` (String) Worker queue pod CPU
- `pod_memory` (String) Worker queue pod memory

Expand Down
2 changes: 1 addition & 1 deletion internal/provider/datasources/data_source_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (d *clustersDataSource) Read(
if len(data.CloudProvider.ValueString()) > 0 {
params.Provider = (*platform.ListClustersParamsProvider)(data.CloudProvider.ValueStringPointer())
}
params.Names, diags = utils.TypesListToStringSlicePtr(ctx, data.Names)
params.Names, diags = utils.TypesSetToStringSlicePtr(ctx, data.Names)
if diags.HasError() {
resp.Diagnostics.Append(diags...)
return
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/datasources/data_source_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (d *deploymentDataSource) Read(
}

// Populate the model with the response data
diags := data.ReadFromResponse(ctx, deployment.JSON200)
diags := data.ReadFromResponse(ctx, deployment.JSON200, false)
if diags.HasError() {
resp.Diagnostics.Append(diags...)
return
Expand Down
Loading

0 comments on commit f57a290

Please sign in to comment.