コード例 #1
0
import pulumi
import pulumi_digitalocean as do

# Create a DigitalOcean resource (Domain)
domain = do.Domain("my-domain", name='my-domain.io')

# Export the name of the domain
pulumi.export('domain_name', domain.name)
コード例 #2
0
                     },
                 },
                 __opts__=ResourceOptions(provider=k8s_provider))

ingress = Service('do-app-svc',
                  spec={
                      'type': 'LoadBalancer',
                      'selector': app_labels,
                      'ports': [{
                          'port': 80
                      }],
                  },
                  __opts__=ResourceOptions(provider=k8s_provider,
                                           custom_timeouts={
                                               "create": "15m",
                                               "delete": "15m"
                                           }))

ingress_ip = ingress.status['load_balancer']['ingress'][0]['ip']

export('ingress_ip', ingress_ip)

if domain_name:
    domain = do.Domain("do-domain", name=domain_name, ip_address=ingress_ip)

    cname_record = do.DnsRecord("do-domain-name",
                                domain=domain_name,
                                type="CNAME",
                                name="www",
                                value="@")
コード例 #3
0
"""A DigitalOcean Python Pulumi program"""

import pulumi
import pulumi_digitalocean as do

# Create a DigitalOcean resource (Domain)
domain = do.Domain('my-domain', name='my-domain.io')

# Export the name of the domain
pulumi.export('domain_name', domain.name)