azuredevops.ServiceendpointGcpTerraform
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const example = new azuredevops.Project("example", {
name: "Example Project",
visibility: "private",
versionControl: "Git",
workItemTemplate: "Agile",
description: "Managed by Terraform",
});
const exampleServiceendpointGcpTerraform = new azuredevops.ServiceendpointGcpTerraform("example", {
projectId: example.id,
tokenUri: "https://oauth2.example.com/token",
clientEmail: "gcp-sa-example@example.iam.gserviceaccount.com",
privateKey: "0000000000000000000000000000000000000",
serviceEndpointName: "Example GCP Terraform extension",
gcpProjectId: "Example GCP Project",
description: "Managed by Terraform",
});
import pulumi
import pulumi_azuredevops as azuredevops
example = azuredevops.Project("example",
name="Example Project",
visibility="private",
version_control="Git",
work_item_template="Agile",
description="Managed by Terraform")
example_serviceendpoint_gcp_terraform = azuredevops.ServiceendpointGcpTerraform("example",
project_id=example.id,
token_uri="https://oauth2.example.com/token",
client_email="gcp-sa-example@example.iam.gserviceaccount.com",
private_key="0000000000000000000000000000000000000",
service_endpoint_name="Example GCP Terraform extension",
gcp_project_id="Example GCP Project",
description="Managed by Terraform")
package main
import (
"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
Name: pulumi.String("Example Project"),
Visibility: pulumi.String("private"),
VersionControl: pulumi.String("Git"),
WorkItemTemplate: pulumi.String("Agile"),
Description: pulumi.String("Managed by Terraform"),
})
if err != nil {
return err
}
_, err = azuredevops.NewServiceendpointGcpTerraform(ctx, "example", &azuredevops.ServiceendpointGcpTerraformArgs{
ProjectId: example.ID(),
TokenUri: pulumi.String("https://oauth2.example.com/token"),
ClientEmail: pulumi.String("gcp-sa-example@example.iam.gserviceaccount.com"),
PrivateKey: pulumi.String("0000000000000000000000000000000000000"),
ServiceEndpointName: pulumi.String("Example GCP Terraform extension"),
GcpProjectId: pulumi.String("Example GCP Project"),
Description: pulumi.String("Managed by Terraform"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() =>
{
var example = new AzureDevOps.Project("example", new()
{
Name = "Example Project",
Visibility = "private",
VersionControl = "Git",
WorkItemTemplate = "Agile",
Description = "Managed by Terraform",
});
var exampleServiceendpointGcpTerraform = new AzureDevOps.ServiceendpointGcpTerraform("example", new()
{
ProjectId = example.Id,
TokenUri = "https://oauth2.example.com/token",
ClientEmail = "gcp-sa-example@example.iam.gserviceaccount.com",
PrivateKey = "0000000000000000000000000000000000000",
ServiceEndpointName = "Example GCP Terraform extension",
GcpProjectId = "Example GCP Project",
Description = "Managed by Terraform",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.Project;
import com.pulumi.azuredevops.ProjectArgs;
import com.pulumi.azuredevops.ServiceendpointGcpTerraform;
import com.pulumi.azuredevops.ServiceendpointGcpTerraformArgs;
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 Project("example", ProjectArgs.builder()
.name("Example Project")
.visibility("private")
.versionControl("Git")
.workItemTemplate("Agile")
.description("Managed by Terraform")
.build());
var exampleServiceendpointGcpTerraform = new ServiceendpointGcpTerraform("exampleServiceendpointGcpTerraform", ServiceendpointGcpTerraformArgs.builder()
.projectId(example.id())
.tokenUri("https://oauth2.example.com/token")
.clientEmail("gcp-sa-example@example.iam.gserviceaccount.com")
.privateKey("0000000000000000000000000000000000000")
.serviceEndpointName("Example GCP Terraform extension")
.gcpProjectId("Example GCP Project")
.description("Managed by Terraform")
.build());
}
}
resources:
example:
type: azuredevops:Project
properties:
name: Example Project
visibility: private
versionControl: Git
workItemTemplate: Agile
description: Managed by Terraform
exampleServiceendpointGcpTerraform:
type: azuredevops:ServiceendpointGcpTerraform
name: example
properties:
projectId: ${example.id}
tokenUri: https://oauth2.example.com/token
clientEmail: gcp-sa-example@example.iam.gserviceaccount.com
privateKey: '0000000000000000000000000000000000000'
serviceEndpointName: Example GCP Terraform extension
gcpProjectId: Example GCP Project
description: Managed by Terraform
Relevant Links
Create ServiceendpointGcpTerraform Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceendpointGcpTerraform(name: string, args: ServiceendpointGcpTerraformArgs, opts?: CustomResourceOptions);
@overload
def ServiceendpointGcpTerraform(resource_name: str,
args: ServiceendpointGcpTerraformArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceendpointGcpTerraform(resource_name: str,
opts: Optional[ResourceOptions] = None,
gcp_project_id: Optional[str] = None,
private_key: Optional[str] = None,
project_id: Optional[str] = None,
service_endpoint_name: Optional[str] = None,
token_uri: Optional[str] = None,
authorization: Optional[Mapping[str, str]] = None,
client_email: Optional[str] = None,
description: Optional[str] = None,
scope: Optional[str] = None)
func NewServiceendpointGcpTerraform(ctx *Context, name string, args ServiceendpointGcpTerraformArgs, opts ...ResourceOption) (*ServiceendpointGcpTerraform, error)
public ServiceendpointGcpTerraform(string name, ServiceendpointGcpTerraformArgs args, CustomResourceOptions? opts = null)
public ServiceendpointGcpTerraform(String name, ServiceendpointGcpTerraformArgs args)
public ServiceendpointGcpTerraform(String name, ServiceendpointGcpTerraformArgs args, CustomResourceOptions options)
type: azuredevops:ServiceendpointGcpTerraform
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 ServiceendpointGcpTerraformArgs
- 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 ServiceendpointGcpTerraformArgs
- 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 ServiceendpointGcpTerraformArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceendpointGcpTerraformArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceendpointGcpTerraformArgs
- 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 serviceendpointGcpTerraformResource = new AzureDevOps.ServiceendpointGcpTerraform("serviceendpointGcpTerraformResource", new()
{
GcpProjectId = "string",
PrivateKey = "string",
ProjectId = "string",
ServiceEndpointName = "string",
TokenUri = "string",
Authorization =
{
{ "string", "string" },
},
ClientEmail = "string",
Description = "string",
Scope = "string",
});
example, err := azuredevops.NewServiceendpointGcpTerraform(ctx, "serviceendpointGcpTerraformResource", &azuredevops.ServiceendpointGcpTerraformArgs{
GcpProjectId: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
ProjectId: pulumi.String("string"),
ServiceEndpointName: pulumi.String("string"),
TokenUri: pulumi.String("string"),
Authorization: pulumi.StringMap{
"string": pulumi.String("string"),
},
ClientEmail: pulumi.String("string"),
Description: pulumi.String("string"),
Scope: pulumi.String("string"),
})
var serviceendpointGcpTerraformResource = new ServiceendpointGcpTerraform("serviceendpointGcpTerraformResource", ServiceendpointGcpTerraformArgs.builder()
.gcpProjectId("string")
.privateKey("string")
.projectId("string")
.serviceEndpointName("string")
.tokenUri("string")
.authorization(Map.of("string", "string"))
.clientEmail("string")
.description("string")
.scope("string")
.build());
serviceendpoint_gcp_terraform_resource = azuredevops.ServiceendpointGcpTerraform("serviceendpointGcpTerraformResource",
gcp_project_id="string",
private_key="string",
project_id="string",
service_endpoint_name="string",
token_uri="string",
authorization={
"string": "string",
},
client_email="string",
description="string",
scope="string")
const serviceendpointGcpTerraformResource = new azuredevops.ServiceendpointGcpTerraform("serviceendpointGcpTerraformResource", {
gcpProjectId: "string",
privateKey: "string",
projectId: "string",
serviceEndpointName: "string",
tokenUri: "string",
authorization: {
string: "string",
},
clientEmail: "string",
description: "string",
scope: "string",
});
type: azuredevops:ServiceendpointGcpTerraform
properties:
authorization:
string: string
clientEmail: string
description: string
gcpProjectId: string
privateKey: string
projectId: string
scope: string
serviceEndpointName: string
tokenUri: string
ServiceendpointGcpTerraform 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 ServiceendpointGcpTerraform resource accepts the following input properties:
- Gcp
Project stringId - GCP project associated with the Service Connection.
- Private
Key string - The client email field in the JSON key file for creating the JSON Web Token.
- Project
Id string - The ID of the project.
- Service
Endpoint stringName - The Service Endpoint name.
- Token
Uri string - The token uri field in the JSON key file for creating the JSON Web Token.
- Dictionary<string, string>
- Client
Email string - The client email field in the JSON key file for creating the JSON Web Token.
- Description string
- Scope string
- Scope to be provided.
- Gcp
Project stringId - GCP project associated with the Service Connection.
- Private
Key string - The client email field in the JSON key file for creating the JSON Web Token.
- Project
Id string - The ID of the project.
- Service
Endpoint stringName - The Service Endpoint name.
- Token
Uri string - The token uri field in the JSON key file for creating the JSON Web Token.
- map[string]string
- Client
Email string - The client email field in the JSON key file for creating the JSON Web Token.
- Description string
- Scope string
- Scope to be provided.
- gcp
Project StringId - GCP project associated with the Service Connection.
- private
Key String - The client email field in the JSON key file for creating the JSON Web Token.
- project
Id String - The ID of the project.
- service
Endpoint StringName - The Service Endpoint name.
- token
Uri String - The token uri field in the JSON key file for creating the JSON Web Token.
- Map<String,String>
- client
Email String - The client email field in the JSON key file for creating the JSON Web Token.
- description String
- scope String
- Scope to be provided.
- gcp
Project stringId - GCP project associated with the Service Connection.
- private
Key string - The client email field in the JSON key file for creating the JSON Web Token.
- project
Id string - The ID of the project.
- service
Endpoint stringName - The Service Endpoint name.
- token
Uri string - The token uri field in the JSON key file for creating the JSON Web Token.
- {[key: string]: string}
- client
Email string - The client email field in the JSON key file for creating the JSON Web Token.
- description string
- scope string
- Scope to be provided.
- gcp_
project_ strid - GCP project associated with the Service Connection.
- private_
key str - The client email field in the JSON key file for creating the JSON Web Token.
- project_
id str - The ID of the project.
- service_
endpoint_ strname - The Service Endpoint name.
- token_
uri str - The token uri field in the JSON key file for creating the JSON Web Token.
- Mapping[str, str]
- client_
email str - The client email field in the JSON key file for creating the JSON Web Token.
- description str
- scope str
- Scope to be provided.
- gcp
Project StringId - GCP project associated with the Service Connection.
- private
Key String - The client email field in the JSON key file for creating the JSON Web Token.
- project
Id String - The ID of the project.
- service
Endpoint StringName - The Service Endpoint name.
- token
Uri String - The token uri field in the JSON key file for creating the JSON Web Token.
- Map<String>
- client
Email String - The client email field in the JSON key file for creating the JSON Web Token.
- description String
- scope String
- Scope to be provided.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceendpointGcpTerraform 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 ServiceendpointGcpTerraform Resource
Get an existing ServiceendpointGcpTerraform 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?: ServiceendpointGcpTerraformState, opts?: CustomResourceOptions): ServiceendpointGcpTerraform
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
authorization: Optional[Mapping[str, str]] = None,
client_email: Optional[str] = None,
description: Optional[str] = None,
gcp_project_id: Optional[str] = None,
private_key: Optional[str] = None,
project_id: Optional[str] = None,
scope: Optional[str] = None,
service_endpoint_name: Optional[str] = None,
token_uri: Optional[str] = None) -> ServiceendpointGcpTerraform
func GetServiceendpointGcpTerraform(ctx *Context, name string, id IDInput, state *ServiceendpointGcpTerraformState, opts ...ResourceOption) (*ServiceendpointGcpTerraform, error)
public static ServiceendpointGcpTerraform Get(string name, Input<string> id, ServiceendpointGcpTerraformState? state, CustomResourceOptions? opts = null)
public static ServiceendpointGcpTerraform get(String name, Output<String> id, ServiceendpointGcpTerraformState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Dictionary<string, string>
- Client
Email string - The client email field in the JSON key file for creating the JSON Web Token.
- Description string
- Gcp
Project stringId - GCP project associated with the Service Connection.
- Private
Key string - The client email field in the JSON key file for creating the JSON Web Token.
- Project
Id string - The ID of the project.
- Scope string
- Scope to be provided.
- Service
Endpoint stringName - The Service Endpoint name.
- Token
Uri string - The token uri field in the JSON key file for creating the JSON Web Token.
- map[string]string
- Client
Email string - The client email field in the JSON key file for creating the JSON Web Token.
- Description string
- Gcp
Project stringId - GCP project associated with the Service Connection.
- Private
Key string - The client email field in the JSON key file for creating the JSON Web Token.
- Project
Id string - The ID of the project.
- Scope string
- Scope to be provided.
- Service
Endpoint stringName - The Service Endpoint name.
- Token
Uri string - The token uri field in the JSON key file for creating the JSON Web Token.
- Map<String,String>
- client
Email String - The client email field in the JSON key file for creating the JSON Web Token.
- description String
- gcp
Project StringId - GCP project associated with the Service Connection.
- private
Key String - The client email field in the JSON key file for creating the JSON Web Token.
- project
Id String - The ID of the project.
- scope String
- Scope to be provided.
- service
Endpoint StringName - The Service Endpoint name.
- token
Uri String - The token uri field in the JSON key file for creating the JSON Web Token.
- {[key: string]: string}
- client
Email string - The client email field in the JSON key file for creating the JSON Web Token.
- description string
- gcp
Project stringId - GCP project associated with the Service Connection.
- private
Key string - The client email field in the JSON key file for creating the JSON Web Token.
- project
Id string - The ID of the project.
- scope string
- Scope to be provided.
- service
Endpoint stringName - The Service Endpoint name.
- token
Uri string - The token uri field in the JSON key file for creating the JSON Web Token.
- Mapping[str, str]
- client_
email str - The client email field in the JSON key file for creating the JSON Web Token.
- description str
- gcp_
project_ strid - GCP project associated with the Service Connection.
- private_
key str - The client email field in the JSON key file for creating the JSON Web Token.
- project_
id str - The ID of the project.
- scope str
- Scope to be provided.
- service_
endpoint_ strname - The Service Endpoint name.
- token_
uri str - The token uri field in the JSON key file for creating the JSON Web Token.
- Map<String>
- client
Email String - The client email field in the JSON key file for creating the JSON Web Token.
- description String
- gcp
Project StringId - GCP project associated with the Service Connection.
- private
Key String - The client email field in the JSON key file for creating the JSON Web Token.
- project
Id String - The ID of the project.
- scope String
- Scope to be provided.
- service
Endpoint StringName - The Service Endpoint name.
- token
Uri String - The token uri field in the JSON key file for creating the JSON Web Token.
Import
Azure DevOps Service Endpoint GCP can be imported using projectID/serviceEndpointID or projectName/serviceEndpointID
$ pulumi import azuredevops:index/serviceendpointGcpTerraform:ServiceendpointGcpTerraform azuredevops_serviceendpoint_gcp_terraform.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuredevops
Terraform Provider.