Recorder
Provides an AWS Config Configuration Recorder. Please note that this resource does not start the created recorder automatically.
Note: Starting the Configuration Recorder requires a
delivery channel(while delivery channel creation requires Configuration Recorder). This is whyaws.cfg.RecorderStatusis a separate resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var role = new Aws.Iam.Role("role", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Action"": ""sts:AssumeRole"",
""Principal"": {
""Service"": ""config.amazonaws.com""
},
""Effect"": ""Allow"",
""Sid"": """"
}
]
}
",
});
var foo = new Aws.Cfg.Recorder("foo", new Aws.Cfg.RecorderArgs
{
RoleArn = role.Arn,
});
}
}
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cfg"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
role, err := iam.NewRole(ctx, "role", &iam.RoleArgs{
AssumeRolePolicy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", " \"Version\": \"2012-10-17\",\n", " \"Statement\": [\n", " {\n", " \"Action\": \"sts:AssumeRole\",\n", " \"Principal\": {\n", " \"Service\": \"config.amazonaws.com\"\n", " },\n", " \"Effect\": \"Allow\",\n", " \"Sid\": \"\"\n", " }\n", " ]\n", "}\n", "\n")),
})
if err != nil {
return err
}
_, err = cfg.NewRecorder(ctx, "foo", &cfg.RecorderArgs{
RoleArn: role.Arn,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
role = aws.iam.Role("role", assume_role_policy="""{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "config.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
""")
foo = aws.cfg.Recorder("foo", role_arn=role.arn)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const role = new aws.iam.Role("r", {
assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "config.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
`,
});
const foo = new aws.cfg.Recorder("foo", {
roleArn: role.arn,
});Create a Recorder Resource
new Recorder(name: string, args: RecorderArgs, opts?: CustomResourceOptions);def Recorder(resource_name, opts=None, name=None, recording_group=None, role_arn=None, __props__=None);func NewRecorder(ctx *Context, name string, args RecorderArgs, opts ...ResourceOption) (*Recorder, error)public Recorder(string name, RecorderArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RecorderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RecorderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RecorderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Recorder Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Recorder resource accepts the following input properties:
- Role
Arn string Amazon Resource Name (ARN) of the IAM role. used to make read or write requests to the delivery channel and to describe the AWS resources associated with the account. See AWS Docs for more details.
- Name string
The name of the recorder. Defaults to
default. Changing it recreates the resource.- Recording
Group RecorderRecording Group Args Recording group - see below.
- Role
Arn string Amazon Resource Name (ARN) of the IAM role. used to make read or write requests to the delivery channel and to describe the AWS resources associated with the account. See AWS Docs for more details.
- Name string
The name of the recorder. Defaults to
default. Changing it recreates the resource.- Recording
Group RecorderRecording Group Recording group - see below.
- role
Arn string Amazon Resource Name (ARN) of the IAM role. used to make read or write requests to the delivery channel and to describe the AWS resources associated with the account. See AWS Docs for more details.
- name string
The name of the recorder. Defaults to
default. Changing it recreates the resource.- recording
Group RecorderRecording Group Recording group - see below.
- role_
arn str Amazon Resource Name (ARN) of the IAM role. used to make read or write requests to the delivery channel and to describe the AWS resources associated with the account. See AWS Docs for more details.
- name str
The name of the recorder. Defaults to
default. Changing it recreates the resource.- recording_
group Dict[RecorderRecording Group] Recording group - see below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Recorder resource produces the following output properties:
Look up an Existing Recorder Resource
Get an existing Recorder 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?: RecorderState, opts?: CustomResourceOptions): Recorderstatic get(resource_name, id, opts=None, name=None, recording_group=None, role_arn=None, __props__=None);func GetRecorder(ctx *Context, name string, id IDInput, state *RecorderState, opts ...ResourceOption) (*Recorder, error)public static Recorder Get(string name, Input<string> id, RecorderState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Name string
The name of the recorder. Defaults to
default. Changing it recreates the resource.- Recording
Group RecorderRecording Group Args Recording group - see below.
- Role
Arn string Amazon Resource Name (ARN) of the IAM role. used to make read or write requests to the delivery channel and to describe the AWS resources associated with the account. See AWS Docs for more details.
- Name string
The name of the recorder. Defaults to
default. Changing it recreates the resource.- Recording
Group RecorderRecording Group Recording group - see below.
- Role
Arn string Amazon Resource Name (ARN) of the IAM role. used to make read or write requests to the delivery channel and to describe the AWS resources associated with the account. See AWS Docs for more details.
- name string
The name of the recorder. Defaults to
default. Changing it recreates the resource.- recording
Group RecorderRecording Group Recording group - see below.
- role
Arn string Amazon Resource Name (ARN) of the IAM role. used to make read or write requests to the delivery channel and to describe the AWS resources associated with the account. See AWS Docs for more details.
- name str
The name of the recorder. Defaults to
default. Changing it recreates the resource.- recording_
group Dict[RecorderRecording Group] Recording group - see below.
- role_
arn str Amazon Resource Name (ARN) of the IAM role. used to make read or write requests to the delivery channel and to describe the AWS resources associated with the account. See AWS Docs for more details.
Supporting Types
RecorderRecordingGroup
- All
Supported bool Specifies whether AWS Config records configuration changes for every supported type of regional resource (which includes any new type that will become supported in the future). Conflicts with
resource_types. Defaults totrue.- Include
Global boolResource Types Specifies whether AWS Config includes all supported types of global resources with the resources that it records. Requires
all_supported = true. Conflicts withresource_types.- Resource
Types List<string> A list that specifies the types of AWS resources for which AWS Config records configuration changes (for example,
AWS::EC2::InstanceorAWS::CloudTrail::Trail). See relevant part of AWS Docs for available types.
- All
Supported bool Specifies whether AWS Config records configuration changes for every supported type of regional resource (which includes any new type that will become supported in the future). Conflicts with
resource_types. Defaults totrue.- Include
Global boolResource Types Specifies whether AWS Config includes all supported types of global resources with the resources that it records. Requires
all_supported = true. Conflicts withresource_types.- Resource
Types []string A list that specifies the types of AWS resources for which AWS Config records configuration changes (for example,
AWS::EC2::InstanceorAWS::CloudTrail::Trail). See relevant part of AWS Docs for available types.
- all
Supported boolean Specifies whether AWS Config records configuration changes for every supported type of regional resource (which includes any new type that will become supported in the future). Conflicts with
resource_types. Defaults totrue.- include
Global booleanResource Types Specifies whether AWS Config includes all supported types of global resources with the resources that it records. Requires
all_supported = true. Conflicts withresource_types.- resource
Types string[] A list that specifies the types of AWS resources for which AWS Config records configuration changes (for example,
AWS::EC2::InstanceorAWS::CloudTrail::Trail). See relevant part of AWS Docs for available types.
- all
Supported bool Specifies whether AWS Config records configuration changes for every supported type of regional resource (which includes any new type that will become supported in the future). Conflicts with
resource_types. Defaults totrue.- include
Global boolResource Types Specifies whether AWS Config includes all supported types of global resources with the resources that it records. Requires
all_supported = true. Conflicts withresource_types.- resource
Types List[str] A list that specifies the types of AWS resources for which AWS Config records configuration changes (for example,
AWS::EC2::InstanceorAWS::CloudTrail::Trail). See relevant part of AWS Docs for available types.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.