Source

Implementation

Provisioner Type

Resource Type

Flavor

Tool

dns-with-route

Prerequisites for dns-in-codespace:

  • Have gh installed, this provisioner is using the GitHub CLI to get the name of the current GitHub Codespace.
Outputs a *.localhost domain as the hostname and associated URL in http on port 8080

type: dns
expected_outputs:
  - host
  - url

10-dns-with-url.provisioners.yaml (view on GitHub) :

- uri: template://community-provisioners/dns-with-route
  type: dns
  description: Outputs a *.localhost domain as the hostname and associated URL in http on port 8080
  init: |
    randomHostname: dns{{ randAlphaNum 6 | lower }}.localhost    
  state: |
    instanceHostname: {{ dig "instanceHostname" .Init.randomHostname .State | quote }}    
  outputs: |
    host: {{ .State.instanceHostname }}
    url: http://{{ .State.instanceHostname }}:8080    
  expected_outputs:
    - host
    - url