astronomer / terraform-provider-astro

Astro Terraform Provider
https://registry.terraform.io/providers/astronomer/astro/latest
Other
11 stars 4 forks source link

Add deployment resource #9

Closed vandyliu closed 7 months ago

vandyliu commented 7 months ago

Description

๐ŸŽŸ Issue(s)

https://github.com/astronomer/astronomer-terraform-provider/issues/10

๐Ÿงช Functional Testing

Hosted deployment config

resource "astronomer_deployment" "test_deployment1" {
    name = "tf--1"
    description = "%v"
    type = "DEDICATED"
    cluster_id = "clv17vgft000801kkydsws63x"
    contact_emails = ["preview@astronomer.test"]
    default_task_pod_cpu = "0.25"
    default_task_pod_memory = "0.5Gi"
    executor = "KUBERNETES"
    is_cicd_enforced = true
    is_dag_deploy_enabled = true
    is_development_mode = false
    is_high_availability = true
    resource_quota_cpu = "10"
    resource_quota_memory = "20Gi"
    scheduler_size = "SMALL"
    workspace_id = astronomer_workspace.test_workspace.id
    environment_variables = [{
        key = "key1"
        value = "value1"
        is_secret = false
    }]
}

resource "astronomer_deployment" "test_deployment2" {
    name = "tf--2"
    description = "%v"
    type = "STANDARD"
    cloud_provider = "AWS"
    region = "us-east-1"
    contact_emails = []
    default_task_pod_cpu = "0.25"
    default_task_pod_memory = "0.5Gi"
    executor = "CELERY"
    is_cicd_enforced = true
    is_dag_deploy_enabled = true
    is_development_mode = false
    is_high_availability = false
    resource_quota_cpu = "10"
    resource_quota_memory = "20Gi"
    scheduler_size = "SMALL"
    workspace_id = astronomer_workspace.test_workspace.id
    environment_variables = []
    worker_queues = [{
        name = "default"
        is_default = true
        astro_machine = "A5"
        max_worker_count = 10
        min_worker_count = 0
        worker_concurrency = 1
    }]
}

Hybrid deployment config

resource "astronomer_deployment" "test_deployment1" {
        name = "tf--1"
        description = "%v"
        type = "HYBRID"
        cluster_id = "clnp86ly5000401ndagu20g81"
        task_pod_node_pool_id = "clnp86ly5000301ndzfxz895w"
        contact_emails = ["preview@astronomer.test"]
        executor = "KUBERNETES"
        is_cicd_enforced = true
        is_dag_deploy_enabled = true
        scheduler_replicas = 1
        scheduler_au = 5
        workspace_id = astronomer_workspace.test_workspace.id
        environment_variables = [{
            key = "key1"
            value = "value1"
            is_secret = false
        }]
    }

๐Ÿ“ธ Screenshots

๐Ÿ“‹ Checklist