aptible / terraform-provider-aptible

The official Terraform provider for Aptible Deploy
https://registry.terraform.io/providers/aptible/aptible/latest
10 stars 13 forks source link

Endpoint Creation is Broken for Apps #32

Closed robert-hill closed 4 years ago

robert-hill commented 4 years ago
resource "aptible_endpoint" "EXAMPLE" {
    env_id = ENVIONMENT_ID
    service_name = "SERVICE_NAME"
    resource_id = aptible_app.APP_HANDLE.app_id
    default_domain = true
    endpoint_type = "https"
    internal = false
    platform = "alb"
    container_port = 5000
}

In the above example for creating an endpoint, the service_name argument is not implemented, and there doesn't seem to be a workaround for creating an App endpoint and pointing it to a service/container.

In the source code, it doesn't seem to exist: https://github.com/aptible/terraform-provider-aptible/blob/master/aptible/resource_endpoint.go#L23

robert-hill commented 4 years ago

Ah, I see now where the problem is: The actual argument is process_type not service_name so this may just be an easy documentation update for the team.

robertfairhead commented 4 years ago

Yes, that's correct. We had originally thought to call it service_name but decided on process_type because it's more consistent with other documentation.

I'll update the Terraform documentation to reflect that.

Thank you for raising this to our attention!

robert-hill commented 4 years ago

No problem! Loving the work you all have done here, and I actually have a really great module that will do a complete service standup with conditionals for DB/endpoint needs after only using the provider for one day!