ResourceDataSync

Provides a SSM resource data sync.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var hogeBucket = new Aws.S3.Bucket("hogeBucket", new Aws.S3.BucketArgs
        {
            Region = "us-east-1",
        });
        var hogeBucketPolicy = new Aws.S3.BucketPolicy("hogeBucketPolicy", new Aws.S3.BucketPolicyArgs
        {
            Bucket = hogeBucket.BucketName,
            Policy = @"{
    ""Version"": ""2012-10-17"",
    ""Statement"": [
        {
            ""Sid"": ""SSMBucketPermissionsCheck"",
            ""Effect"": ""Allow"",
            ""Principal"": {
                ""Service"": ""ssm.amazonaws.com""
            },
            ""Action"": ""s3:GetBucketAcl"",
            ""Resource"": ""arn:aws:s3:::tf-test-bucket-1234""
        },
        {
            ""Sid"": "" SSMBucketDelivery"",
            ""Effect"": ""Allow"",
            ""Principal"": {
                ""Service"": ""ssm.amazonaws.com""
            },
            ""Action"": ""s3:PutObject"",
            ""Resource"": [""arn:aws:s3:::tf-test-bucket-1234/*""],
            ""Condition"": {
                ""StringEquals"": {
                    ""s3:x-amz-acl"": ""bucket-owner-full-control""
                }
            }
        }
    ]
}

",
        });
        var foo = new Aws.Ssm.ResourceDataSync("foo", new Aws.Ssm.ResourceDataSyncArgs
        {
            S3Destination = new Aws.Ssm.Inputs.ResourceDataSyncS3DestinationArgs
            {
                BucketName = hogeBucket.BucketName,
                Region = hogeBucket.Region,
            },
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/s3"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ssm"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        hogeBucket, err := s3.NewBucket(ctx, "hogeBucket", &s3.BucketArgs{
            Region: pulumi.String("us-east-1"),
        })
        if err != nil {
            return err
        }
        _, err = s3.NewBucketPolicy(ctx, "hogeBucketPolicy", &s3.BucketPolicyArgs{
            Bucket: hogeBucket.Bucket,
            Policy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "    \"Version\": \"2012-10-17\",\n", "    \"Statement\": [\n", "        {\n", "            \"Sid\": \"SSMBucketPermissionsCheck\",\n", "            \"Effect\": \"Allow\",\n", "            \"Principal\": {\n", "                \"Service\": \"ssm.amazonaws.com\"\n", "            },\n", "            \"Action\": \"s3:GetBucketAcl\",\n", "            \"Resource\": \"arn:aws:s3:::tf-test-bucket-1234\"\n", "        },\n", "        {\n", "            \"Sid\": \" SSMBucketDelivery\",\n", "            \"Effect\": \"Allow\",\n", "            \"Principal\": {\n", "                \"Service\": \"ssm.amazonaws.com\"\n", "            },\n", "            \"Action\": \"s3:PutObject\",\n", "            \"Resource\": [\"arn:aws:s3:::tf-test-bucket-1234/*\"],\n", "            \"Condition\": {\n", "                \"StringEquals\": {\n", "                    \"s3:x-amz-acl\": \"bucket-owner-full-control\"\n", "                }\n", "            }\n", "        }\n", "    ]\n", "}\n", "\n")),
        })
        if err != nil {
            return err
        }
        _, err = ssm.NewResourceDataSync(ctx, "foo", &ssm.ResourceDataSyncArgs{
            S3Destination: &ssm.ResourceDataSyncS3DestinationArgs{
                BucketName: hogeBucket.Bucket,
                Region:     hogeBucket.Region,
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

hoge_bucket = aws.s3.Bucket("hogeBucket", region="us-east-1")
hoge_bucket_policy = aws.s3.BucketPolicy("hogeBucketPolicy",
    bucket=hoge_bucket.bucket,
    policy="""{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "SSMBucketPermissionsCheck",
            "Effect": "Allow",
            "Principal": {
                "Service": "ssm.amazonaws.com"
            },
            "Action": "s3:GetBucketAcl",
            "Resource": "arn:aws:s3:::tf-test-bucket-1234"
        },
        {
            "Sid": " SSMBucketDelivery",
            "Effect": "Allow",
            "Principal": {
                "Service": "ssm.amazonaws.com"
            },
            "Action": "s3:PutObject",
            "Resource": ["arn:aws:s3:::tf-test-bucket-1234/*"],
            "Condition": {
                "StringEquals": {
                    "s3:x-amz-acl": "bucket-owner-full-control"
                }
            }
        }
    ]
}

""")
foo = aws.ssm.ResourceDataSync("foo", s3_destination={
    "bucket_name": hoge_bucket.bucket,
    "region": hoge_bucket.region,
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const hogeBucket = new aws.s3.Bucket("hoge", {
    region: "us-east-1",
});
const hogeBucketPolicy = new aws.s3.BucketPolicy("hoge", {
    bucket: hogeBucket.bucket,
    policy: `{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "SSMBucketPermissionsCheck",
            "Effect": "Allow",
            "Principal": {
                "Service": "ssm.amazonaws.com"
            },
            "Action": "s3:GetBucketAcl",
            "Resource": "arn:aws:s3:::tf-test-bucket-1234"
        },
        {
            "Sid": " SSMBucketDelivery",
            "Effect": "Allow",
            "Principal": {
                "Service": "ssm.amazonaws.com"
            },
            "Action": "s3:PutObject",
            "Resource": ["arn:aws:s3:::tf-test-bucket-1234/*"],
            "Condition": {
                "StringEquals": {
                    "s3:x-amz-acl": "bucket-owner-full-control"
                }
            }
        }
    ]
}
`,
});
const foo = new aws.ssm.ResourceDataSync("foo", {
    s3Destination: {
        bucketName: hogeBucket.bucket,
        region: hogeBucket.region,
    },
});

Create a ResourceDataSync Resource

def ResourceDataSync(resource_name, opts=None, name=None, s3_destination=None, __props__=None);
name string
The unique name of the resource.
args ResourceDataSyncArgs
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 ResourceDataSyncArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ResourceDataSyncArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ResourceDataSync Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ResourceDataSync resource accepts the following input properties:

S3Destination ResourceDataSyncS3DestinationArgs

Amazon S3 configuration details for the sync.

Name string

Name for the configuration.

S3Destination ResourceDataSyncS3Destination

Amazon S3 configuration details for the sync.

Name string

Name for the configuration.

s3Destination ResourceDataSyncS3Destination

Amazon S3 configuration details for the sync.

name string

Name for the configuration.

s3_destination Dict[ResourceDataSyncS3Destination]

Amazon S3 configuration details for the sync.

name str

Name for the configuration.

Outputs

All input properties are implicitly available as output properties. Additionally, the ResourceDataSync resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ResourceDataSync Resource

Get an existing ResourceDataSync 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?: ResourceDataSyncState, opts?: CustomResourceOptions): ResourceDataSync
static get(resource_name, id, opts=None, name=None, s3_destination=None, __props__=None);
func GetResourceDataSync(ctx *Context, name string, id IDInput, state *ResourceDataSyncState, opts ...ResourceOption) (*ResourceDataSync, error)
public static ResourceDataSync Get(string name, Input<string> id, ResourceDataSyncState? 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

Name for the configuration.

S3Destination ResourceDataSyncS3DestinationArgs

Amazon S3 configuration details for the sync.

Name string

Name for the configuration.

S3Destination ResourceDataSyncS3Destination

Amazon S3 configuration details for the sync.

name string

Name for the configuration.

s3Destination ResourceDataSyncS3Destination

Amazon S3 configuration details for the sync.

name str

Name for the configuration.

s3_destination Dict[ResourceDataSyncS3Destination]

Amazon S3 configuration details for the sync.

Supporting Types

ResourceDataSyncS3Destination

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

BucketName string

Name of S3 bucket where the aggregated data is stored.

Region string

Region with the bucket targeted by the Resource Data Sync.

KmsKeyArn string

ARN of an encryption key for a destination in Amazon S3.

Prefix string

Prefix for the bucket.

SyncFormat string

A supported sync format. Only JsonSerDe is currently supported. Defaults to JsonSerDe.

BucketName string

Name of S3 bucket where the aggregated data is stored.

Region string

Region with the bucket targeted by the Resource Data Sync.

KmsKeyArn string

ARN of an encryption key for a destination in Amazon S3.

Prefix string

Prefix for the bucket.

SyncFormat string

A supported sync format. Only JsonSerDe is currently supported. Defaults to JsonSerDe.

bucketName string

Name of S3 bucket where the aggregated data is stored.

region string

Region with the bucket targeted by the Resource Data Sync.

kmsKeyArn string

ARN of an encryption key for a destination in Amazon S3.

prefix string

Prefix for the bucket.

syncFormat string

A supported sync format. Only JsonSerDe is currently supported. Defaults to JsonSerDe.

bucket_name str

Name of S3 bucket where the aggregated data is stored.

region str

Region with the bucket targeted by the Resource Data Sync.

kms_key_arn str

ARN of an encryption key for a destination in Amazon S3.

prefix str

Prefix for the bucket.

syncFormat str

A supported sync format. Only JsonSerDe is currently supported. Defaults to JsonSerDe.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.