Linker Args
Linker of source and target resource Uses Azure REST API version 2024-04-01. In version 2.x of the Azure Native provider, it used API version 2022-11-01-preview. Other available API versions: 2022-11-01-preview, 2023-04-01-preview, 2024-07-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native servicelinker [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
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 = AzureNative.ServiceLinker.VNetSolutionType.ServiceEndpoint,
},
});
});
package main
import (
servicelinker "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.SecretAuthInfoArgs{
AuthType: pulumi.String("secret"),
Name: pulumi.String("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.AzureResourceArgs{
Id: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db"),
Type: pulumi.String("AzureResource"),
},
VNetSolution: &servicelinker.VNetSolutionArgs{
Type: pulumi.String(servicelinker.VNetSolutionTypeServiceEndpoint),
},
})
if err != nil {
return err
}
return nil
})
}
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 com.pulumi.azurenative.servicelinker.inputs.VNetSolutionArgs;
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(AccessKeyInfoBaseArgs.builder()
.authType("secret")
.name("name")
.secretInfo(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build())
.linkerName("linkName")
.resourceUri("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app")
.targetService(AzureResourceArgs.builder()
.id("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db")
.type("AzureResource")
.build())
.vNetSolution(VNetSolutionArgs.builder()
.type("serviceEndpoint")
.build())
.build());
}
}
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}
Constructors
Properties
The application client type
The connection information consumed by applications, including secrets, connection strings.
The name Linker resource.
The network solution.
The fully qualified Azure Resource manager identifier of the resource to be connected.
An option to store secret value in secure place
The target service properties
The VNet solution.