Try AWS Native preview for resources not in the classic version.
aws.lambda.CodeSigningConfig
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a Lambda Code Signing Config resource. A code signing configuration defines a list of allowed signing profiles and defines the code-signing validation policy (action to be taken if deployment validation checks fail).
For information about Lambda code signing configurations and how to use them, see configuring code signing for Lambda functions
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const newCsc = new aws.lambda.CodeSigningConfig("new_csc", {
allowedPublishers: {
signingProfileVersionArns: [
example1.arn,
example2.arn,
],
},
policies: {
untrustedArtifactOnDeployment: "Warn",
},
description: "My awesome code signing config.",
});
import pulumi
import pulumi_aws as aws
new_csc = aws.lambda_.CodeSigningConfig("new_csc",
allowed_publishers={
"signingProfileVersionArns": [
example1["arn"],
example2["arn"],
],
},
policies={
"untrustedArtifactOnDeployment": "Warn",
},
description="My awesome code signing config.")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewCodeSigningConfig(ctx, "new_csc", &lambda.CodeSigningConfigArgs{
AllowedPublishers: &lambda.CodeSigningConfigAllowedPublishersArgs{
SigningProfileVersionArns: pulumi.StringArray{
example1.Arn,
example2.Arn,
},
},
Policies: &lambda.CodeSigningConfigPoliciesArgs{
UntrustedArtifactOnDeployment: pulumi.String("Warn"),
},
Description: pulumi.String("My awesome code signing config."),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var newCsc = new Aws.Lambda.CodeSigningConfig("new_csc", new()
{
AllowedPublishers = new Aws.Lambda.Inputs.CodeSigningConfigAllowedPublishersArgs
{
SigningProfileVersionArns = new[]
{
example1.Arn,
example2.Arn,
},
},
Policies = new Aws.Lambda.Inputs.CodeSigningConfigPoliciesArgs
{
UntrustedArtifactOnDeployment = "Warn",
},
Description = "My awesome code signing config.",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.CodeSigningConfig;
import com.pulumi.aws.lambda.CodeSigningConfigArgs;
import com.pulumi.aws.lambda.inputs.CodeSigningConfigAllowedPublishersArgs;
import com.pulumi.aws.lambda.inputs.CodeSigningConfigPoliciesArgs;
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 newCsc = new CodeSigningConfig("newCsc", CodeSigningConfigArgs.builder()
.allowedPublishers(CodeSigningConfigAllowedPublishersArgs.builder()
.signingProfileVersionArns(
example1.arn(),
example2.arn())
.build())
.policies(CodeSigningConfigPoliciesArgs.builder()
.untrustedArtifactOnDeployment("Warn")
.build())
.description("My awesome code signing config.")
.build());
}
}
resources:
newCsc:
type: aws:lambda:CodeSigningConfig
name: new_csc
properties:
allowedPublishers:
signingProfileVersionArns:
- ${example1.arn}
- ${example2.arn}
policies:
untrustedArtifactOnDeployment: Warn
description: My awesome code signing config.
Create CodeSigningConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CodeSigningConfig(name: string, args: CodeSigningConfigArgs, opts?: CustomResourceOptions);
@overload
def CodeSigningConfig(resource_name: str,
args: CodeSigningConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CodeSigningConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_publishers: Optional[_lambda_.CodeSigningConfigAllowedPublishersArgs] = None,
description: Optional[str] = None,
policies: Optional[_lambda_.CodeSigningConfigPoliciesArgs] = None)
func NewCodeSigningConfig(ctx *Context, name string, args CodeSigningConfigArgs, opts ...ResourceOption) (*CodeSigningConfig, error)
public CodeSigningConfig(string name, CodeSigningConfigArgs args, CustomResourceOptions? opts = null)
public CodeSigningConfig(String name, CodeSigningConfigArgs args)
public CodeSigningConfig(String name, CodeSigningConfigArgs args, CustomResourceOptions options)
type: aws:lambda:CodeSigningConfig
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 CodeSigningConfigArgs
- 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 CodeSigningConfigArgs
- 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 CodeSigningConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CodeSigningConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CodeSigningConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var codeSigningConfigResource = new Aws.Lambda.CodeSigningConfig("codeSigningConfigResource", new()
{
AllowedPublishers = new Aws.Lambda.Inputs.CodeSigningConfigAllowedPublishersArgs
{
SigningProfileVersionArns = new[]
{
"string",
},
},
Description = "string",
Policies = new Aws.Lambda.Inputs.CodeSigningConfigPoliciesArgs
{
UntrustedArtifactOnDeployment = "string",
},
});
example, err := lambda.NewCodeSigningConfig(ctx, "codeSigningConfigResource", &lambda.CodeSigningConfigArgs{
AllowedPublishers: &lambda.CodeSigningConfigAllowedPublishersArgs{
SigningProfileVersionArns: pulumi.StringArray{
pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Policies: &lambda.CodeSigningConfigPoliciesArgs{
UntrustedArtifactOnDeployment: pulumi.String("string"),
},
})
var codeSigningConfigResource = new CodeSigningConfig("codeSigningConfigResource", CodeSigningConfigArgs.builder()
.allowedPublishers(CodeSigningConfigAllowedPublishersArgs.builder()
.signingProfileVersionArns("string")
.build())
.description("string")
.policies(CodeSigningConfigPoliciesArgs.builder()
.untrustedArtifactOnDeployment("string")
.build())
.build());
code_signing_config_resource = aws.lambda_.CodeSigningConfig("codeSigningConfigResource",
allowed_publishers={
"signingProfileVersionArns": ["string"],
},
description="string",
policies={
"untrustedArtifactOnDeployment": "string",
})
const codeSigningConfigResource = new aws.lambda.CodeSigningConfig("codeSigningConfigResource", {
allowedPublishers: {
signingProfileVersionArns: ["string"],
},
description: "string",
policies: {
untrustedArtifactOnDeployment: "string",
},
});
type: aws:lambda:CodeSigningConfig
properties:
allowedPublishers:
signingProfileVersionArns:
- string
description: string
policies:
untrustedArtifactOnDeployment: string
CodeSigningConfig 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 CodeSigningConfig resource accepts the following input properties:
- Allowed
Publishers CodeSigning Config Allowed Publishers - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- Description string
- Descriptive name for this code signing configuration.
- Policies
Code
Signing Config Policies - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- Allowed
Publishers CodeSigning Config Allowed Publishers Args - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- Description string
- Descriptive name for this code signing configuration.
- Policies
Code
Signing Config Policies Args - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- allowed
Publishers CodeSigning Config Allowed Publishers - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- description String
- Descriptive name for this code signing configuration.
- policies
Code
Signing Config Policies - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- allowed
Publishers CodeSigning Config Allowed Publishers - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- description string
- Descriptive name for this code signing configuration.
- policies
Code
Signing Config Policies - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- allowed_
publishers lambda_.Code Signing Config Allowed Publishers Args - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- description str
- Descriptive name for this code signing configuration.
- policies
lambda_.
Code Signing Config Policies Args - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- allowed
Publishers Property Map - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- description String
- Descriptive name for this code signing configuration.
- policies Property Map
- A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
Outputs
All input properties are implicitly available as output properties. Additionally, the CodeSigningConfig resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) of the code signing configuration.
- Config
Id string - Unique identifier for the code signing configuration.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - The date and time that the code signing configuration was last modified.
- Arn string
- The Amazon Resource Name (ARN) of the code signing configuration.
- Config
Id string - Unique identifier for the code signing configuration.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - The date and time that the code signing configuration was last modified.
- arn String
- The Amazon Resource Name (ARN) of the code signing configuration.
- config
Id String - Unique identifier for the code signing configuration.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - The date and time that the code signing configuration was last modified.
- arn string
- The Amazon Resource Name (ARN) of the code signing configuration.
- config
Id string - Unique identifier for the code signing configuration.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified string - The date and time that the code signing configuration was last modified.
- arn str
- The Amazon Resource Name (ARN) of the code signing configuration.
- config_
id str - Unique identifier for the code signing configuration.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified str - The date and time that the code signing configuration was last modified.
- arn String
- The Amazon Resource Name (ARN) of the code signing configuration.
- config
Id String - Unique identifier for the code signing configuration.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - The date and time that the code signing configuration was last modified.
Look up Existing CodeSigningConfig Resource
Get an existing CodeSigningConfig 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?: CodeSigningConfigState, opts?: CustomResourceOptions): CodeSigningConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_publishers: Optional[_lambda_.CodeSigningConfigAllowedPublishersArgs] = None,
arn: Optional[str] = None,
config_id: Optional[str] = None,
description: Optional[str] = None,
last_modified: Optional[str] = None,
policies: Optional[_lambda_.CodeSigningConfigPoliciesArgs] = None) -> CodeSigningConfig
func GetCodeSigningConfig(ctx *Context, name string, id IDInput, state *CodeSigningConfigState, opts ...ResourceOption) (*CodeSigningConfig, error)
public static CodeSigningConfig Get(string name, Input<string> id, CodeSigningConfigState? state, CustomResourceOptions? opts = null)
public static CodeSigningConfig get(String name, Output<String> id, CodeSigningConfigState 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.
- Allowed
Publishers CodeSigning Config Allowed Publishers - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- Arn string
- The Amazon Resource Name (ARN) of the code signing configuration.
- Config
Id string - Unique identifier for the code signing configuration.
- Description string
- Descriptive name for this code signing configuration.
- Last
Modified string - The date and time that the code signing configuration was last modified.
- Policies
Code
Signing Config Policies - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- Allowed
Publishers CodeSigning Config Allowed Publishers Args - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- Arn string
- The Amazon Resource Name (ARN) of the code signing configuration.
- Config
Id string - Unique identifier for the code signing configuration.
- Description string
- Descriptive name for this code signing configuration.
- Last
Modified string - The date and time that the code signing configuration was last modified.
- Policies
Code
Signing Config Policies Args - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- allowed
Publishers CodeSigning Config Allowed Publishers - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- arn String
- The Amazon Resource Name (ARN) of the code signing configuration.
- config
Id String - Unique identifier for the code signing configuration.
- description String
- Descriptive name for this code signing configuration.
- last
Modified String - The date and time that the code signing configuration was last modified.
- policies
Code
Signing Config Policies - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- allowed
Publishers CodeSigning Config Allowed Publishers - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- arn string
- The Amazon Resource Name (ARN) of the code signing configuration.
- config
Id string - Unique identifier for the code signing configuration.
- description string
- Descriptive name for this code signing configuration.
- last
Modified string - The date and time that the code signing configuration was last modified.
- policies
Code
Signing Config Policies - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- allowed_
publishers lambda_.Code Signing Config Allowed Publishers Args - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- arn str
- The Amazon Resource Name (ARN) of the code signing configuration.
- config_
id str - Unique identifier for the code signing configuration.
- description str
- Descriptive name for this code signing configuration.
- last_
modified str - The date and time that the code signing configuration was last modified.
- policies
lambda_.
Code Signing Config Policies Args - A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
- allowed
Publishers Property Map - A configuration block of allowed publishers as signing profiles for this code signing configuration. Detailed below.
- arn String
- The Amazon Resource Name (ARN) of the code signing configuration.
- config
Id String - Unique identifier for the code signing configuration.
- description String
- Descriptive name for this code signing configuration.
- last
Modified String - The date and time that the code signing configuration was last modified.
- policies Property Map
- A configuration block of code signing policies that define the actions to take if the validation checks fail. Detailed below.
Supporting Types
CodeSigningConfigAllowedPublishers, CodeSigningConfigAllowedPublishersArgs
- Signing
Profile List<string>Version Arns - The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
- Signing
Profile []stringVersion Arns - The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
- signing
Profile List<String>Version Arns - The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
- signing
Profile string[]Version Arns - The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
- signing_
profile_ Sequence[str]version_ arns - The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
- signing
Profile List<String>Version Arns - The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package.
CodeSigningConfigPolicies, CodeSigningConfigPoliciesArgs
- Untrusted
Artifact stringOn Deployment - Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values:
Warn
,Enforce
. Default value:Warn
.
- Untrusted
Artifact stringOn Deployment - Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values:
Warn
,Enforce
. Default value:Warn
.
- untrusted
Artifact StringOn Deployment - Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values:
Warn
,Enforce
. Default value:Warn
.
- untrusted
Artifact stringOn Deployment - Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values:
Warn
,Enforce
. Default value:Warn
.
- untrusted_
artifact_ stron_ deployment - Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values:
Warn
,Enforce
. Default value:Warn
.
- untrusted
Artifact StringOn Deployment - Code signing configuration policy for deployment validation failure. If you set the policy to Enforce, Lambda blocks the deployment request if code-signing validation checks fail. If you set the policy to Warn, Lambda allows the deployment and creates a CloudWatch log. Valid values:
Warn
,Enforce
. Default value:Warn
.
Import
Using pulumi import
, import Code Signing Configs using their ARN. For example:
$ pulumi import aws:lambda/codeSigningConfig:CodeSigningConfig imported_csc arn:aws:lambda:us-west-2:123456789012:code-signing-config:csc-0f6c334abcdea4d8b
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.