Domain service links are for managing versionless domains for services. The link associates an existing service with an existing domain, but doesn’t create or delete either resource.
If you are managing your versionless domain with a service link, you may not also use a resource_fastly_domain block as well.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const example = new fastly.DomainServiceLink("example", {
domainId: exampleFastlyDomain.id,
serviceId: exampleFastlyServiceVcl.id,
});
import pulumi
import pulumi_fastly as fastly
example = fastly.DomainServiceLink("example",
domain_id=example_fastly_domain["id"],
service_id=example_fastly_service_vcl["id"])
package main
import (
"github.com/pulumi/pulumi-fastly/sdk/v11/go/fastly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := fastly.NewDomainServiceLink(ctx, "example", &fastly.DomainServiceLinkArgs{
DomainId: pulumi.Any(exampleFastlyDomain.Id),
ServiceId: pulumi.Any(exampleFastlyServiceVcl.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fastly = Pulumi.Fastly;
return await Deployment.RunAsync(() =>
{
var example = new Fastly.DomainServiceLink("example", new()
{
DomainId = exampleFastlyDomain.Id,
ServiceId = exampleFastlyServiceVcl.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.DomainServiceLink;
import com.pulumi.fastly.DomainServiceLinkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new DomainServiceLink("example", DomainServiceLinkArgs.builder()
.domainId(exampleFastlyDomain.id())
.serviceId(exampleFastlyServiceVcl.id())
.build());
}
}
resources:
example:
type: fastly:DomainServiceLink
properties:
domainId: ${exampleFastlyDomain.id}
serviceId: ${exampleFastlyServiceVcl.id}
Create DomainServiceLink Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DomainServiceLink(name: string, args: DomainServiceLinkArgs, opts?: CustomResourceOptions);@overload
def DomainServiceLink(resource_name: str,
args: DomainServiceLinkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DomainServiceLink(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain_id: Optional[str] = None,
service_id: Optional[str] = None)func NewDomainServiceLink(ctx *Context, name string, args DomainServiceLinkArgs, opts ...ResourceOption) (*DomainServiceLink, error)public DomainServiceLink(string name, DomainServiceLinkArgs args, CustomResourceOptions? opts = null)
public DomainServiceLink(String name, DomainServiceLinkArgs args)
public DomainServiceLink(String name, DomainServiceLinkArgs args, CustomResourceOptions options)
type: fastly:DomainServiceLink
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DomainServiceLinkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DomainServiceLinkArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DomainServiceLinkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DomainServiceLinkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DomainServiceLinkArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var domainServiceLinkResource = new Fastly.DomainServiceLink("domainServiceLinkResource", new()
{
DomainId = "string",
ServiceId = "string",
});
example, err := fastly.NewDomainServiceLink(ctx, "domainServiceLinkResource", &fastly.DomainServiceLinkArgs{
DomainId: pulumi.String("string"),
ServiceId: pulumi.String("string"),
})
var domainServiceLinkResource = new DomainServiceLink("domainServiceLinkResource", DomainServiceLinkArgs.builder()
.domainId("string")
.serviceId("string")
.build());
domain_service_link_resource = fastly.DomainServiceLink("domainServiceLinkResource",
domain_id="string",
service_id="string")
const domainServiceLinkResource = new fastly.DomainServiceLink("domainServiceLinkResource", {
domainId: "string",
serviceId: "string",
});
type: fastly:DomainServiceLink
properties:
domainId: string
serviceId: string
DomainServiceLink Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DomainServiceLink resource accepts the following input properties:
- domain_
id str - The Domain Identifier of the versionless domain being linked (UUID).
- service_
id str - The service_id associated with your domain
Outputs
All input properties are implicitly available as output properties. Additionally, the DomainServiceLink resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DomainServiceLink Resource
Get an existing DomainServiceLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DomainServiceLinkState, opts?: CustomResourceOptions): DomainServiceLink@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
domain_id: Optional[str] = None,
service_id: Optional[str] = None) -> DomainServiceLinkfunc GetDomainServiceLink(ctx *Context, name string, id IDInput, state *DomainServiceLinkState, opts ...ResourceOption) (*DomainServiceLink, error)public static DomainServiceLink Get(string name, Input<string> id, DomainServiceLinkState? state, CustomResourceOptions? opts = null)public static DomainServiceLink get(String name, Output<String> id, DomainServiceLinkState state, CustomResourceOptions options)resources: _: type: fastly:DomainServiceLink get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- domain_
id str - The Domain Identifier of the versionless domain being linked (UUID).
- service_
id str - The service_id associated with your domain
Import
Domain service links can be imported using the domain ID, e.g.
$ pulumi import fastly:index/domainServiceLink:DomainServiceLink example <domain_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Fastly pulumi/pulumi-fastly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fastlyTerraform Provider.
