1. Packages
  2. AzureDevOps
  3. API Docs
  4. ServiceendpointGcpTerraform
Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 by Pulumi

azuredevops.ServiceendpointGcpTerraform

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const exampleProject = new azuredevops.Project("exampleProject", {
        visibility: "private",
        versionControl: "Git",
        workItemTemplate: "Agile",
        description: "Managed by Terraform",
    });
    const exampleServiceendpointGcpTerraform = new azuredevops.ServiceendpointGcpTerraform("exampleServiceendpointGcpTerraform", {
        projectId: exampleProject.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_project = azuredevops.Project("exampleProject",
        visibility="private",
        version_control="Git",
        work_item_template="Agile",
        description="Managed by Terraform")
    example_serviceendpoint_gcp_terraform = azuredevops.ServiceendpointGcpTerraform("exampleServiceendpointGcpTerraform",
        project_id=example_project.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 {
    		exampleProject, err := azuredevops.NewProject(ctx, "exampleProject", &azuredevops.ProjectArgs{
    			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, "exampleServiceendpointGcpTerraform", &azuredevops.ServiceendpointGcpTerraformArgs{
    			ProjectId:           exampleProject.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 exampleProject = new AzureDevOps.Project("exampleProject", new()
        {
            Visibility = "private",
            VersionControl = "Git",
            WorkItemTemplate = "Agile",
            Description = "Managed by Terraform",
        });
    
        var exampleServiceendpointGcpTerraform = new AzureDevOps.ServiceendpointGcpTerraform("exampleServiceendpointGcpTerraform", new()
        {
            ProjectId = exampleProject.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 exampleProject = new Project("exampleProject", ProjectArgs.builder()        
                .visibility("private")
                .versionControl("Git")
                .workItemTemplate("Agile")
                .description("Managed by Terraform")
                .build());
    
            var exampleServiceendpointGcpTerraform = new ServiceendpointGcpTerraform("exampleServiceendpointGcpTerraform", ServiceendpointGcpTerraformArgs.builder()        
                .projectId(exampleProject.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:
      exampleProject:
        type: azuredevops:Project
        properties:
          visibility: private
          versionControl: Git
          workItemTemplate: Agile
          description: Managed by Terraform
      exampleServiceendpointGcpTerraform:
        type: azuredevops:ServiceendpointGcpTerraform
        properties:
          projectId: ${exampleProject.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
    

    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.

    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

    The ServiceendpointGcpTerraform resource accepts the following input properties:

    GcpProjectId string
    GCP project associated with the Service Connection.
    PrivateKey string
    The client email field in the JSON key file for creating the JSON Web Token.
    ProjectId string
    The ID of the project.
    ServiceEndpointName string
    The Service Endpoint name.
    TokenUri string
    The token uri field in the JSON key file for creating the JSON Web Token.
    Authorization Dictionary<string, string>
    ClientEmail string
    The client email field in the JSON key file for creating the JSON Web Token.
    Description string
    Scope string
    Scope to be provided.
    GcpProjectId string
    GCP project associated with the Service Connection.
    PrivateKey string
    The client email field in the JSON key file for creating the JSON Web Token.
    ProjectId string
    The ID of the project.
    ServiceEndpointName string
    The Service Endpoint name.
    TokenUri string
    The token uri field in the JSON key file for creating the JSON Web Token.
    Authorization map[string]string
    ClientEmail string
    The client email field in the JSON key file for creating the JSON Web Token.
    Description string
    Scope string
    Scope to be provided.
    gcpProjectId String
    GCP project associated with the Service Connection.
    privateKey String
    The client email field in the JSON key file for creating the JSON Web Token.
    projectId String
    The ID of the project.
    serviceEndpointName String
    The Service Endpoint name.
    tokenUri String
    The token uri field in the JSON key file for creating the JSON Web Token.
    authorization Map<String,String>
    clientEmail String
    The client email field in the JSON key file for creating the JSON Web Token.
    description String
    scope String
    Scope to be provided.
    gcpProjectId string
    GCP project associated with the Service Connection.
    privateKey string
    The client email field in the JSON key file for creating the JSON Web Token.
    projectId string
    The ID of the project.
    serviceEndpointName string
    The Service Endpoint name.
    tokenUri string
    The token uri field in the JSON key file for creating the JSON Web Token.
    authorization {[key: string]: string}
    clientEmail 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_id str
    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_name str
    The Service Endpoint name.
    token_uri str
    The token uri field in the JSON key file for creating the JSON Web Token.
    authorization 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.
    gcpProjectId String
    GCP project associated with the Service Connection.
    privateKey String
    The client email field in the JSON key file for creating the JSON Web Token.
    projectId String
    The ID of the project.
    serviceEndpointName String
    The Service Endpoint name.
    tokenUri String
    The token uri field in the JSON key file for creating the JSON Web Token.
    authorization Map<String>
    clientEmail 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.
    The following state arguments are supported:
    Authorization Dictionary<string, string>
    ClientEmail string
    The client email field in the JSON key file for creating the JSON Web Token.
    Description string
    GcpProjectId string
    GCP project associated with the Service Connection.
    PrivateKey string
    The client email field in the JSON key file for creating the JSON Web Token.
    ProjectId string
    The ID of the project.
    Scope string
    Scope to be provided.
    ServiceEndpointName string
    The Service Endpoint name.
    TokenUri string
    The token uri field in the JSON key file for creating the JSON Web Token.
    Authorization map[string]string
    ClientEmail string
    The client email field in the JSON key file for creating the JSON Web Token.
    Description string
    GcpProjectId string
    GCP project associated with the Service Connection.
    PrivateKey string
    The client email field in the JSON key file for creating the JSON Web Token.
    ProjectId string
    The ID of the project.
    Scope string
    Scope to be provided.
    ServiceEndpointName string
    The Service Endpoint name.
    TokenUri string
    The token uri field in the JSON key file for creating the JSON Web Token.
    authorization Map<String,String>
    clientEmail String
    The client email field in the JSON key file for creating the JSON Web Token.
    description String
    gcpProjectId String
    GCP project associated with the Service Connection.
    privateKey String
    The client email field in the JSON key file for creating the JSON Web Token.
    projectId String
    The ID of the project.
    scope String
    Scope to be provided.
    serviceEndpointName String
    The Service Endpoint name.
    tokenUri String
    The token uri field in the JSON key file for creating the JSON Web Token.
    authorization {[key: string]: string}
    clientEmail string
    The client email field in the JSON key file for creating the JSON Web Token.
    description string
    gcpProjectId string
    GCP project associated with the Service Connection.
    privateKey string
    The client email field in the JSON key file for creating the JSON Web Token.
    projectId string
    The ID of the project.
    scope string
    Scope to be provided.
    serviceEndpointName string
    The Service Endpoint name.
    tokenUri string
    The token uri field in the JSON key file for creating the JSON Web Token.
    authorization 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_id str
    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_name str
    The Service Endpoint name.
    token_uri str
    The token uri field in the JSON key file for creating the JSON Web Token.
    authorization Map<String>
    clientEmail String
    The client email field in the JSON key file for creating the JSON Web Token.
    description String
    gcpProjectId String
    GCP project associated with the Service Connection.
    privateKey String
    The client email field in the JSON key file for creating the JSON Web Token.
    projectId String
    The ID of the project.
    scope String
    Scope to be provided.
    serviceEndpointName String
    The Service Endpoint name.
    tokenUri 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.
    azuredevops logo
    Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 by Pulumi