com.pulumi.gcp.integrationconnectors.kotlin.ManagedZoneArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.integrationconnectors.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.integrationconnectors.ManagedZoneArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* An Integration connectors Managed Zone.
* To get more information about ManagedZone, see:
* * [API documentation](https://cloud.google.com/integration-connectors/docs/reference/rest/v1/projects.locations.global.managedZones)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/integration-connectors/docs)
* ## Example Usage
* ### Integration Connectors Managed Zone
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const targetProject = new gcp.organizations.Project("target_project", {
* projectId: "tf-test_2605",
* name: "tf-test_34535",
* orgId: "123456789",
* billingAccount: "000000-0000000-0000000-000000",
* });
* const testProject = gcp.organizations.getProject({});
* const dnsPeerBinding = new gcp.projects.IAMMember("dns_peer_binding", {
* project: targetProject.projectId,
* role: "roles/dns.peer",
* member: testProject.then(testProject => `serviceAccount:service-${testProject.number}@gcp-sa-connectors.iam.gserviceaccount.com`),
* });
* const dns = new gcp.projects.Service("dns", {
* project: targetProject.projectId,
* service: "dns.googleapis.com",
* });
* const compute = new gcp.projects.Service("compute", {
* project: targetProject.projectId,
* service: "compute.googleapis.com",
* });
* const network = new gcp.compute.Network("network", {
* project: targetProject.projectId,
* name: "test",
* autoCreateSubnetworks: false,
* });
* const zone = new gcp.dns.ManagedZone("zone", {
* name: "tf-test-dns_22375",
* dnsName: "private_29439.example.com.",
* visibility: "private",
* privateVisibilityConfig: {
* networks: [{
* networkUrl: network.id,
* }],
* },
* });
* const testmanagedzone = new gcp.integrationconnectors.ManagedZone("testmanagedzone", {
* name: "test",
* description: "tf created description",
* labels: {
* intent: "example",
* },
* targetProject: targetProject.projectId,
* targetVpc: "test",
* dns: zone.dnsName,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* target_project = gcp.organizations.Project("target_project",
* project_id="tf-test_2605",
* name="tf-test_34535",
* org_id="123456789",
* billing_account="000000-0000000-0000000-000000")
* test_project = gcp.organizations.get_project()
* dns_peer_binding = gcp.projects.IAMMember("dns_peer_binding",
* project=target_project.project_id,
* role="roles/dns.peer",
* member=f"serviceAccount:service-{test_project.number}@gcp-sa-connectors.iam.gserviceaccount.com")
* dns = gcp.projects.Service("dns",
* project=target_project.project_id,
* service="dns.googleapis.com")
* compute = gcp.projects.Service("compute",
* project=target_project.project_id,
* service="compute.googleapis.com")
* network = gcp.compute.Network("network",
* project=target_project.project_id,
* name="test",
* auto_create_subnetworks=False)
* zone = gcp.dns.ManagedZone("zone",
* name="tf-test-dns_22375",
* dns_name="private_29439.example.com.",
* visibility="private",
* private_visibility_config=gcp.dns.ManagedZonePrivateVisibilityConfigArgs(
* networks=[gcp.dns.ManagedZonePrivateVisibilityConfigNetworkArgs(
* network_url=network.id,
* )],
* ))
* testmanagedzone = gcp.integrationconnectors.ManagedZone("testmanagedzone",
* name="test",
* description="tf created description",
* labels={
* "intent": "example",
* },
* target_project=target_project.project_id,
* target_vpc="test",
* dns=zone.dns_name)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var targetProject = new Gcp.Organizations.Project("target_project", new()
* {
* ProjectId = "tf-test_2605",
* Name = "tf-test_34535",
* OrgId = "123456789",
* BillingAccount = "000000-0000000-0000000-000000",
* });
* var testProject = Gcp.Organizations.GetProject.Invoke();
* var dnsPeerBinding = new Gcp.Projects.IAMMember("dns_peer_binding", new()
* {
* Project = targetProject.ProjectId,
* Role = "roles/dns.peer",
* Member = $"serviceAccount:service-{testProject.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-connectors.iam.gserviceaccount.com",
* });
* var dns = new Gcp.Projects.Service("dns", new()
* {
* Project = targetProject.ProjectId,
* ServiceName = "dns.googleapis.com",
* });
* var compute = new Gcp.Projects.Service("compute", new()
* {
* Project = targetProject.ProjectId,
* ServiceName = "compute.googleapis.com",
* });
* var network = new Gcp.Compute.Network("network", new()
* {
* Project = targetProject.ProjectId,
* Name = "test",
* AutoCreateSubnetworks = false,
* });
* var zone = new Gcp.Dns.ManagedZone("zone", new()
* {
* Name = "tf-test-dns_22375",
* DnsName = "private_29439.example.com.",
* Visibility = "private",
* PrivateVisibilityConfig = new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigArgs
* {
* Networks = new[]
* {
* new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigNetworkArgs
* {
* NetworkUrl = network.Id,
* },
* },
* },
* });
* var testmanagedzone = new Gcp.IntegrationConnectors.ManagedZone("testmanagedzone", new()
* {
* Name = "test",
* Description = "tf created description",
* Labels =
* {
* { "intent", "example" },
* },
* TargetProject = targetProject.ProjectId,
* TargetVpc = "test",
* Dns = zone.DnsName,
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/integrationconnectors"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* targetProject, err := organizations.NewProject(ctx, "target_project", &organizations.ProjectArgs{
* ProjectId: pulumi.String("tf-test_2605"),
* Name: pulumi.String("tf-test_34535"),
* OrgId: pulumi.String("123456789"),
* BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
* })
* if err != nil {
* return err
* }
* testProject, err := organizations.LookupProject(ctx, nil, nil)
* if err != nil {
* return err
* }
* _, err = projects.NewIAMMember(ctx, "dns_peer_binding", &projects.IAMMemberArgs{
* Project: targetProject.ProjectId,
* Role: pulumi.String("roles/dns.peer"),
* Member: pulumi.String(fmt.Sprintf("serviceAccount:service-%[email protected]", testProject.Number)),
* })
* if err != nil {
* return err
* }
* _, err = projects.NewService(ctx, "dns", &projects.ServiceArgs{
* Project: targetProject.ProjectId,
* Service: pulumi.String("dns.googleapis.com"),
* })
* if err != nil {
* return err
* }
* _, err = projects.NewService(ctx, "compute", &projects.ServiceArgs{
* Project: targetProject.ProjectId,
* Service: pulumi.String("compute.googleapis.com"),
* })
* if err != nil {
* return err
* }
* network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
* Project: targetProject.ProjectId,
* Name: pulumi.String("test"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* zone, err := dns.NewManagedZone(ctx, "zone", &dns.ManagedZoneArgs{
* Name: pulumi.String("tf-test-dns_22375"),
* DnsName: pulumi.String("private_29439.example.com."),
* Visibility: pulumi.String("private"),
* PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
* Networks: dns.ManagedZonePrivateVisibilityConfigNetworkArray{
* &dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
* NetworkUrl: network.ID(),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* _, err = integrationconnectors.NewManagedZone(ctx, "testmanagedzone", &integrationconnectors.ManagedZoneArgs{
* Name: pulumi.String("test"),
* Description: pulumi.String("tf created description"),
* Labels: pulumi.StringMap{
* "intent": pulumi.String("example"),
* },
* TargetProject: targetProject.ProjectId,
* TargetVpc: pulumi.String("test"),
* Dns: zone.DnsName,
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.organizations.Project;
* import com.pulumi.gcp.organizations.ProjectArgs;
* import com.pulumi.gcp.organizations.OrganizationsFunctions;
* import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
* import com.pulumi.gcp.projects.IAMMember;
* import com.pulumi.gcp.projects.IAMMemberArgs;
* import com.pulumi.gcp.projects.Service;
* import com.pulumi.gcp.projects.ServiceArgs;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.dns.ManagedZone;
* import com.pulumi.gcp.dns.ManagedZoneArgs;
* import com.pulumi.gcp.dns.inputs.ManagedZonePrivateVisibilityConfigArgs;
* import com.pulumi.gcp.integrationconnectors.ManagedZone;
* import com.pulumi.gcp.integrationconnectors.ManagedZoneArgs;
* 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 targetProject = new Project("targetProject", ProjectArgs.builder()
* .projectId("tf-test_2605")
* .name("tf-test_34535")
* .orgId("123456789")
* .billingAccount("000000-0000000-0000000-000000")
* .build());
* final var testProject = OrganizationsFunctions.getProject();
* var dnsPeerBinding = new IAMMember("dnsPeerBinding", IAMMemberArgs.builder()
* .project(targetProject.projectId())
* .role("roles/dns.peer")
* .member(String.format("serviceAccount:service-%[email protected]", testProject.applyValue(getProjectResult -> getProjectResult.number())))
* .build());
* var dns = new Service("dns", ServiceArgs.builder()
* .project(targetProject.projectId())
* .service("dns.googleapis.com")
* .build());
* var compute = new Service("compute", ServiceArgs.builder()
* .project(targetProject.projectId())
* .service("compute.googleapis.com")
* .build());
* var network = new Network("network", NetworkArgs.builder()
* .project(targetProject.projectId())
* .name("test")
* .autoCreateSubnetworks(false)
* .build());
* var zone = new ManagedZone("zone", ManagedZoneArgs.builder()
* .name("tf-test-dns_22375")
* .dnsName("private_29439.example.com.")
* .visibility("private")
* .privateVisibilityConfig(ManagedZonePrivateVisibilityConfigArgs.builder()
* .networks(ManagedZonePrivateVisibilityConfigNetworkArgs.builder()
* .networkUrl(network.id())
* .build())
* .build())
* .build());
* var testmanagedzone = new ManagedZone("testmanagedzone", ManagedZoneArgs.builder()
* .name("test")
* .description("tf created description")
* .labels(Map.of("intent", "example"))
* .targetProject(targetProject.projectId())
* .targetVpc("test")
* .dns(zone.dnsName())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* targetProject:
* type: gcp:organizations:Project
* name: target_project
* properties:
* projectId: tf-test_2605
* name: tf-test_34535
* orgId: '123456789'
* billingAccount: 000000-0000000-0000000-000000
* dnsPeerBinding:
* type: gcp:projects:IAMMember
* name: dns_peer_binding
* properties:
* project: ${targetProject.projectId}
* role: roles/dns.peer
* member: serviceAccount:service-${testProject.number}@gcp-sa-connectors.iam.gserviceaccount.com
* dns:
* type: gcp:projects:Service
* properties:
* project: ${targetProject.projectId}
* service: dns.googleapis.com
* compute:
* type: gcp:projects:Service
* properties:
* project: ${targetProject.projectId}
* service: compute.googleapis.com
* network:
* type: gcp:compute:Network
* properties:
* project: ${targetProject.projectId}
* name: test
* autoCreateSubnetworks: false
* zone:
* type: gcp:dns:ManagedZone
* properties:
* name: tf-test-dns_22375
* dnsName: private_29439.example.com.
* visibility: private
* privateVisibilityConfig:
* networks:
* - networkUrl: ${network.id}
* testmanagedzone:
* type: gcp:integrationconnectors:ManagedZone
* properties:
* name: test
* description: tf created description
* labels:
* intent: example
* targetProject: ${targetProject.projectId}
* targetVpc: test
* dns: ${zone.dnsName}
* variables:
* testProject:
* fn::invoke:
* Function: gcp:organizations:getProject
* Arguments: {}
* ```
*
* ## Import
* ManagedZone can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/global/managedZones/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, ManagedZone can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:integrationconnectors/managedZone:ManagedZone default projects/{{project}}/locations/global/managedZones/{{name}}
* ```
* ```sh
* $ pulumi import gcp:integrationconnectors/managedZone:ManagedZone default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:integrationconnectors/managedZone:ManagedZone default {{name}}
* ```
* @property description Description of the resource.
* @property dns DNS Name of the resource.
* @property labels Resource labels to represent user provided metadata.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effective_labels` for all of the labels present on the resource.
* @property name Name of Managed Zone needs to be created.
* - - -
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property targetProject The name of the Target Project.
* @property targetVpc The name of the Target Project VPC Network.
*/
public data class ManagedZoneArgs(
public val description: Output? = null,
public val dns: Output? = null,
public val labels: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy