com.pulumi.gcp.compute.kotlin.RegionInstanceTemplate.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.compute.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateAdvancedMachineFeatures
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateConfidentialInstanceConfig
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateDisk
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateGuestAccelerator
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateNetworkInterface
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateNetworkPerformanceConfig
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateReservationAffinity
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateScheduling
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateServiceAccount
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateShieldedInstanceConfig
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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateAdvancedMachineFeatures.Companion.toKotlin as regionInstanceTemplateAdvancedMachineFeaturesToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateConfidentialInstanceConfig.Companion.toKotlin as regionInstanceTemplateConfidentialInstanceConfigToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateDisk.Companion.toKotlin as regionInstanceTemplateDiskToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateGuestAccelerator.Companion.toKotlin as regionInstanceTemplateGuestAcceleratorToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateNetworkInterface.Companion.toKotlin as regionInstanceTemplateNetworkInterfaceToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateNetworkPerformanceConfig.Companion.toKotlin as regionInstanceTemplateNetworkPerformanceConfigToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateReservationAffinity.Companion.toKotlin as regionInstanceTemplateReservationAffinityToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateScheduling.Companion.toKotlin as regionInstanceTemplateSchedulingToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateServiceAccount.Companion.toKotlin as regionInstanceTemplateServiceAccountToKotlin
import com.pulumi.gcp.compute.kotlin.outputs.RegionInstanceTemplateShieldedInstanceConfig.Companion.toKotlin as regionInstanceTemplateShieldedInstanceConfigToKotlin
/**
* Builder for [RegionInstanceTemplate].
*/
@PulumiTagMarker
public class RegionInstanceTemplateResourceBuilder internal constructor() {
public var name: String? = null
public var args: RegionInstanceTemplateArgs = RegionInstanceTemplateArgs()
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 RegionInstanceTemplateArgsBuilder.() -> Unit) {
val builder = RegionInstanceTemplateArgsBuilder()
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(): RegionInstanceTemplate {
val builtJavaResource = com.pulumi.gcp.compute.RegionInstanceTemplate(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RegionInstanceTemplate(builtJavaResource)
}
}
/**
*
* ## Import
* Instance templates can be imported using any of these accepted formats:
* * `projects/{{project}}/regions/{{region}}/instanceTemplates/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, instance templates can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default projects/{{project}}/regions/{{region}}/instanceTemplates/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionInstanceTemplate:RegionInstanceTemplate default {{name}}
* ```
*/
public class RegionInstanceTemplate internal constructor(
override val javaResource: com.pulumi.gcp.compute.RegionInstanceTemplate,
) : KotlinCustomResource(javaResource, RegionInstanceTemplateMapper) {
/**
* Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below
*/
public val advancedMachineFeatures: Output?
get() = javaResource.advancedMachineFeatures().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
regionInstanceTemplateAdvancedMachineFeaturesToKotlin(args0)
})
}).orElse(null)
})
/**
* Whether to allow sending and receiving of
* packets with non-matching source or destination IPs. This defaults to false.
*/
public val canIpForward: Output?
get() = javaResource.canIpForward().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is documented below
*/
public val confidentialInstanceConfig: Output
get() = javaResource.confidentialInstanceConfig().applyValue({ args0 ->
args0.let({ args0 ->
regionInstanceTemplateConfidentialInstanceConfigToKotlin(args0)
})
})
/**
* A brief description of this resource.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Disks to attach to instances created from this template.
* This can be specified multiple times for multiple disks. Structure is
* documented below.
*/
public val disks: Output>
get() = javaResource.disks().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
regionInstanceTemplateDiskToKotlin(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 - 2024 Weber Informatics LLC | Privacy Policy