Linker
Linker of source and target resource Azure REST API version: 2022-11-01-preview. Prior API version in Azure Native 1.x: 2021-11-01-preview. Other available API versions: 2021-11-01-preview.
Example Usage
PutLinker
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var linker = new AzureNative.ServiceLinker.Linker("linker", new()
{
AuthInfo = new AzureNative.ServiceLinker.Inputs.SecretAuthInfoArgs
{
AuthType = "secret",
Name = "name",
SecretInfo = new AzureNative.ServiceLinker.Inputs.ValueSecretInfoArgs
{
SecretType = "rawValue",
Value = "secret",
},
},
LinkerName = "linkName",
ResourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
TargetService = new AzureNative.ServiceLinker.Inputs.AzureResourceArgs
{
Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db",
Type = "AzureResource",
},
VNetSolution = new AzureNative.ServiceLinker.Inputs.VNetSolutionArgs
{
Type = "serviceEndpoint",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/servicelinker/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicelinker.NewLinker(ctx, "linker", &servicelinker.LinkerArgs{
AuthInfo: servicelinker.SecretAuthInfo{
AuthType: "secret",
Name: "name",
SecretInfo: servicelinker.ValueSecretInfo{
SecretType: "rawValue",
Value: "secret",
},
},
LinkerName: pulumi.String("linkName"),
ResourceUri: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app"),
TargetService: servicelinker.AzureResource{
Id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db",
Type: "AzureResource",
},
VNetSolution: &servicelinker.VNetSolutionArgs{
Type: pulumi.String("serviceEndpoint"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.servicelinker.Linker;
import com.pulumi.azurenative.servicelinker.LinkerArgs;
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 linker = new Linker("linker", LinkerArgs.builder()
.authInfo(Map.ofEntries(
Map.entry("authType", "secret"),
Map.entry("name", "name"),
Map.entry("secretInfo", Map.ofEntries(
Map.entry("secretType", "rawValue"),
Map.entry("value", "secret")
))
))
.linkerName("linkName")
.resourceUri("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app")
.targetService(Map.ofEntries(
Map.entry("id", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db"),
Map.entry("type", "AzureResource")
))
.vNetSolution(Map.of("type", "serviceEndpoint"))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:servicelinker:Linker linkName /{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}
Content copied to clipboard