com.pulumi.azure.containerapp.kotlin.EnvironmentCertificate.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.containerapp.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 [EnvironmentCertificate].
*/
@PulumiTagMarker
public class EnvironmentCertificateResourceBuilder internal constructor() {
public var name: String? = null
public var args: EnvironmentCertificateArgs = EnvironmentCertificateArgs()
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 EnvironmentCertificateArgsBuilder.() -> Unit) {
val builder = EnvironmentCertificateArgsBuilder()
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(): EnvironmentCertificate {
val builtJavaResource =
com.pulumi.azure.containerapp.EnvironmentCertificate(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EnvironmentCertificate(builtJavaResource)
}
}
/**
* Manages a Container App Environment Certificate.
* ## Example Usage
*
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleAnalyticsWorkspace:
* type: azure:operationalinsights:AnalyticsWorkspace
* name: example
* properties:
* name: acctest-01
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku: PerGB2018
* retentionInDays: 30
* exampleEnvironment:
* type: azure:containerapp:Environment
* name: example
* properties:
* name: myEnvironment
* location: ${example.location}
* resourceGroupName: ${example.name}
* logAnalyticsWorkspaceId: ${exampleAnalyticsWorkspace.id}
* exampleEnvironmentCertificate:
* type: azure:containerapp:EnvironmentCertificate
* name: example
* properties:
* name: myfriendlyname
* containerAppEnvironmentId: ${exampleEnvironment.id}
* certificateBlob:
* fn::invoke:
* Function: std:filebase64
* Arguments:
* input: path/to/certificate_file.pfx
* Return: result
* certificatePassword: $3cretSqu1rreL
* ```
*
* ## Import
* A Container App Environment Certificate can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:containerapp/environmentCertificate:EnvironmentCertificate example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/managedEnvironments/myenv/certificates/mycertificate"
* ```
*/
public class EnvironmentCertificate internal constructor(
override val javaResource: com.pulumi.azure.containerapp.EnvironmentCertificate,
) : KotlinCustomResource(javaResource, EnvironmentCertificateMapper) {
/**
* The Certificate Private Key as a base64 encoded PFX or PEM. Changing this forces a new resource to be created.
*/
public val certificateBlobBase64: Output
get() = javaResource.certificateBlobBase64().applyValue({ args0 -> args0 })
/**
* The password for the Certificate. Changing this forces a new resource to be created.
*/
public val certificatePassword: Output
get() = javaResource.certificatePassword().applyValue({ args0 -> args0 })
/**
* The Container App Managed Environment ID to configure this Certificate on. Changing this forces a new resource to be created.
*/
public val containerAppEnvironmentId: Output
get() = javaResource.containerAppEnvironmentId().applyValue({ args0 -> args0 })
/**
* The expiration date for the Certificate.
*/
public val expirationDate: Output
get() = javaResource.expirationDate().applyValue({ args0 -> args0 })
/**
* The date of issue for the Certificate.
*/
public val issueDate: Output
get() = javaResource.issueDate().applyValue({ args0 -> args0 })
/**
* The Certificate Issuer.
*/
public val issuer: Output
get() = javaResource.issuer().applyValue({ args0 -> args0 })
/**
* The name of the Container Apps Environment Certificate. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The Subject Name for the Certificate.
*/
public val subjectName: Output
get() = javaResource.subjectName().applyValue({ args0 -> args0 })
/**
* A mapping of tags to assign to the resource.
*/
public val tags: Output