github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/dynamodb/init.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package dynamodb
     5  
     6  import (
     7  	"fmt"
     8  
     9  	"github.com/blang/semver"
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  type module struct {
    15  	version semver.Version
    16  }
    17  
    18  func (m *module) Version() semver.Version {
    19  	return m.version
    20  }
    21  
    22  func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
    23  	switch typ {
    24  	case "aws:dynamodb/contributorInsights:ContributorInsights":
    25  		r = &ContributorInsights{}
    26  	case "aws:dynamodb/globalTable:GlobalTable":
    27  		r = &GlobalTable{}
    28  	case "aws:dynamodb/kinesisStreamingDestination:KinesisStreamingDestination":
    29  		r = &KinesisStreamingDestination{}
    30  	case "aws:dynamodb/resourcePolicy:ResourcePolicy":
    31  		r = &ResourcePolicy{}
    32  	case "aws:dynamodb/table:Table":
    33  		r = &Table{}
    34  	case "aws:dynamodb/tableExport:TableExport":
    35  		r = &TableExport{}
    36  	case "aws:dynamodb/tableItem:TableItem":
    37  		r = &TableItem{}
    38  	case "aws:dynamodb/tableReplica:TableReplica":
    39  		r = &TableReplica{}
    40  	case "aws:dynamodb/tag:Tag":
    41  		r = &Tag{}
    42  	default:
    43  		return nil, fmt.Errorf("unknown resource type: %s", typ)
    44  	}
    45  
    46  	err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
    47  	return
    48  }
    49  
    50  func init() {
    51  	version, err := internal.PkgVersion()
    52  	if err != nil {
    53  		version = semver.Version{Major: 1}
    54  	}
    55  	pulumi.RegisterResourceModule(
    56  		"aws",
    57  		"dynamodb/contributorInsights",
    58  		&module{version},
    59  	)
    60  	pulumi.RegisterResourceModule(
    61  		"aws",
    62  		"dynamodb/globalTable",
    63  		&module{version},
    64  	)
    65  	pulumi.RegisterResourceModule(
    66  		"aws",
    67  		"dynamodb/kinesisStreamingDestination",
    68  		&module{version},
    69  	)
    70  	pulumi.RegisterResourceModule(
    71  		"aws",
    72  		"dynamodb/resourcePolicy",
    73  		&module{version},
    74  	)
    75  	pulumi.RegisterResourceModule(
    76  		"aws",
    77  		"dynamodb/table",
    78  		&module{version},
    79  	)
    80  	pulumi.RegisterResourceModule(
    81  		"aws",
    82  		"dynamodb/tableExport",
    83  		&module{version},
    84  	)
    85  	pulumi.RegisterResourceModule(
    86  		"aws",
    87  		"dynamodb/tableItem",
    88  		&module{version},
    89  	)
    90  	pulumi.RegisterResourceModule(
    91  		"aws",
    92  		"dynamodb/tableReplica",
    93  		&module{version},
    94  	)
    95  	pulumi.RegisterResourceModule(
    96  		"aws",
    97  		"dynamodb/tag",
    98  		&module{version},
    99  	)
   100  }