
com.pulumi.gcp.activedirectory.kotlin.Peering.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.activedirectory.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [Peering].
*/
@PulumiTagMarker
public class PeeringResourceBuilder internal constructor() {
public var name: String? = null
public var args: PeeringArgs = PeeringArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend PeeringArgsBuilder.() -> Unit) {
val builder = PeeringArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Peering {
val builtJavaResource = com.pulumi.gcp.activedirectory.Peering(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Peering(builtJavaResource)
}
}
/**
* ## Example Usage
* ### Active Directory Peering Basic
*
* ```yaml
* resources:
* ad-domain-peering:
* type: gcp:activedirectory:Peering
* properties:
* domainResource: ${["ad-domain"].name}
* peeringId: ad-domain-peering
* authorizedNetwork: ${["peered-network"].id}
* deletionProtection: false
* labels:
* foo: bar
* ad-domain:
* type: gcp:activedirectory:Domain
* properties:
* domainName: ad.test.hashicorptest.com
* locations:
* - us-central1
* reservedIpRange: 192.168.255.0/24
* authorizedNetworks:
* - ${["source-network"].id}
* deletionProtection: false
* peered-network:
* type: gcp:compute:Network
* properties:
* project: ${compute.project}
* name: ad-peered-network
* source-network:
* type: gcp:compute:Network
* properties:
* name: ad-network
* compute:
* type: gcp:projects:Service
* properties:
* project: ${["peered-project"].projectId}
* service: compute.googleapis.com
* peered-project:
* type: gcp:organizations:Project
* properties:
* name: my-peered-project
* projectId: my-peered-project
* orgId: '123456789'
* billingAccount: 000000-0000000-0000000-000000
* deletionPolicy: DELETE
* ```
*
* ## Import
* This resource does not support import.
*/
public class Peering internal constructor(
override val javaResource: com.pulumi.gcp.activedirectory.Peering,
) : KotlinCustomResource(javaResource, PeeringMapper) {
/**
* The full names of the Google Compute Engine networks to which the instance is connected. Caller needs to make sure that CIDR subnets do not overlap between networks, else peering creation will fail.
*/
public val authorizedNetwork: Output
get() = javaResource.authorizedNetwork().applyValue({ args0 -> args0 })
/**
* Full domain resource path for the Managed AD Domain involved in peering. The resource path should be in the form projects/{projectId}/locations/global/domains/{domainName}
*/
public val domainResource: Output
get() = javaResource.domainResource().applyValue({ args0 -> args0 })
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
public val effectiveLabels: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy