Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App: internal ports array attribute #570

Merged

Conversation

rienafairefr
Copy link
Contributor

The digitalocean_app spec was also missing the internal_ports attribute on a service, this should fix this. Acceptance test (TestAccDigitalOceanApp_InternalPort) is passing
internal_ports are specified like internal_ports = ["5000"], maybe an array syntax

internal_port {
   port = 5000
}
internal_port {
   port = 2000
}

would be preferred, similarly to the routes attribute. not sure.

@andrewsomething
Copy link
Member

andrewsomething commented Feb 1, 2021

passing internal_ports are specified like internal_ports = ["5000"], maybe an array syntax

I think you've got it right as it currently is. It matches how the yaml spec spec treats them:

  internal_ports:
  - 5000
  - 3000
  routes:
  - path: /
  - path: /foo

https://www.digitalocean.com/docs/app-platform/references/app-specification-reference/

routes could grow additional attributes while internal_ports will always be a list of integers.

Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I left one comment in line. Think we can get rid of appSpecInternalPortSchema()

digitalocean/app_spec.go Outdated Show resolved Hide resolved
@andrewsomething andrewsomething force-pushed the app-internal_ports-attr branch from 0ca2a78 to 9f718d3 Compare February 3, 2021 16:29
@andrewsomething andrewsomething force-pushed the app-internal_ports-attr branch from 9f718d3 to ae89214 Compare February 3, 2021 16:32
@andrewsomething andrewsomething self-requested a review February 3, 2021 16:32
Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: Thanks again for the great contributions!

@andrewsomething andrewsomething merged commit 2ae1b75 into digitalocean:main Feb 3, 2021
andrewsomething added a commit that referenced this pull request Apr 26, 2021
* wip

* wip internal_port

* wip internalPort

* internal_port

* internal port

* internal port acc test

* internal_port

* internal_port

* unneeded

* fixup acceptance test

* acceptance test

* Remove unused appSpecInternalPortSchema()

Co-authored-by: Matthieu Berthomé <matthieu@whisbee.eu>
Co-authored-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants