github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/apprunner/vpcIngressConnection.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 apprunner
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Manages an App Runner VPC Ingress Connection.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apprunner"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := apprunner.NewVpcIngressConnection(ctx, "example", &apprunner.VpcIngressConnectionArgs{
    33  //				Name:       pulumi.String("example"),
    34  //				ServiceArn: pulumi.Any(exampleAwsApprunnerService.Arn),
    35  //				IngressVpcConfiguration: &apprunner.VpcIngressConnectionIngressVpcConfigurationArgs{
    36  //					VpcId:         pulumi.Any(_default.Id),
    37  //					VpcEndpointId: pulumi.Any(apprunner.Id),
    38  //				},
    39  //				Tags: pulumi.StringMap{
    40  //					"foo": pulumi.String("bar"),
    41  //				},
    42  //			})
    43  //			if err != nil {
    44  //				return err
    45  //			}
    46  //			return nil
    47  //		})
    48  //	}
    49  //
    50  // ```
    51  // <!--End PulumiCodeChooser -->
    52  //
    53  // ## Import
    54  //
    55  // Using `pulumi import`, import App Runner VPC Ingress Connection using the `arn`. For example:
    56  //
    57  // ```sh
    58  // $ pulumi import aws:apprunner/vpcIngressConnection:VpcIngressConnection example "arn:aws:apprunner:us-west-2:837424938642:vpcingressconnection/example/b379f86381d74825832c2e82080342fa"
    59  // ```
    60  type VpcIngressConnection struct {
    61  	pulumi.CustomResourceState
    62  
    63  	// The Amazon Resource Name (ARN) of the VPC Ingress Connection.
    64  	Arn pulumi.StringOutput `pulumi:"arn"`
    65  	// The domain name associated with the VPC Ingress Connection resource.
    66  	DomainName pulumi.StringOutput `pulumi:"domainName"`
    67  	// Specifications for the customer’s Amazon VPC and the related AWS PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource. See Ingress VPC Configuration below for more details.
    68  	IngressVpcConfiguration VpcIngressConnectionIngressVpcConfigurationOutput `pulumi:"ingressVpcConfiguration"`
    69  	// A name for the VPC Ingress Connection resource. It must be unique across all the active VPC Ingress Connections in your AWS account in the AWS Region.
    70  	Name pulumi.StringOutput `pulumi:"name"`
    71  	// The Amazon Resource Name (ARN) for this App Runner service that is used to create the VPC Ingress Connection resource.
    72  	ServiceArn pulumi.StringOutput `pulumi:"serviceArn"`
    73  	// The current status of the VPC Ingress Connection.
    74  	Status pulumi.StringOutput `pulumi:"status"`
    75  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    76  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    77  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    78  	//
    79  	// Deprecated: Please use `tags` instead.
    80  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    81  }
    82  
    83  // NewVpcIngressConnection registers a new resource with the given unique name, arguments, and options.
    84  func NewVpcIngressConnection(ctx *pulumi.Context,
    85  	name string, args *VpcIngressConnectionArgs, opts ...pulumi.ResourceOption) (*VpcIngressConnection, error) {
    86  	if args == nil {
    87  		return nil, errors.New("missing one or more required arguments")
    88  	}
    89  
    90  	if args.IngressVpcConfiguration == nil {
    91  		return nil, errors.New("invalid value for required argument 'IngressVpcConfiguration'")
    92  	}
    93  	if args.ServiceArn == nil {
    94  		return nil, errors.New("invalid value for required argument 'ServiceArn'")
    95  	}
    96  	opts = internal.PkgResourceDefaultOpts(opts)
    97  	var resource VpcIngressConnection
    98  	err := ctx.RegisterResource("aws:apprunner/vpcIngressConnection:VpcIngressConnection", name, args, &resource, opts...)
    99  	if err != nil {
   100  		return nil, err
   101  	}
   102  	return &resource, nil
   103  }
   104  
   105  // GetVpcIngressConnection gets an existing VpcIngressConnection resource's state with the given name, ID, and optional
   106  // state properties that are used to uniquely qualify the lookup (nil if not required).
   107  func GetVpcIngressConnection(ctx *pulumi.Context,
   108  	name string, id pulumi.IDInput, state *VpcIngressConnectionState, opts ...pulumi.ResourceOption) (*VpcIngressConnection, error) {
   109  	var resource VpcIngressConnection
   110  	err := ctx.ReadResource("aws:apprunner/vpcIngressConnection:VpcIngressConnection", name, id, state, &resource, opts...)
   111  	if err != nil {
   112  		return nil, err
   113  	}
   114  	return &resource, nil
   115  }
   116  
   117  // Input properties used for looking up and filtering VpcIngressConnection resources.
   118  type vpcIngressConnectionState struct {
   119  	// The Amazon Resource Name (ARN) of the VPC Ingress Connection.
   120  	Arn *string `pulumi:"arn"`
   121  	// The domain name associated with the VPC Ingress Connection resource.
   122  	DomainName *string `pulumi:"domainName"`
   123  	// Specifications for the customer’s Amazon VPC and the related AWS PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource. See Ingress VPC Configuration below for more details.
   124  	IngressVpcConfiguration *VpcIngressConnectionIngressVpcConfiguration `pulumi:"ingressVpcConfiguration"`
   125  	// A name for the VPC Ingress Connection resource. It must be unique across all the active VPC Ingress Connections in your AWS account in the AWS Region.
   126  	Name *string `pulumi:"name"`
   127  	// The Amazon Resource Name (ARN) for this App Runner service that is used to create the VPC Ingress Connection resource.
   128  	ServiceArn *string `pulumi:"serviceArn"`
   129  	// The current status of the VPC Ingress Connection.
   130  	Status *string `pulumi:"status"`
   131  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   132  	Tags map[string]string `pulumi:"tags"`
   133  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   134  	//
   135  	// Deprecated: Please use `tags` instead.
   136  	TagsAll map[string]string `pulumi:"tagsAll"`
   137  }
   138  
   139  type VpcIngressConnectionState struct {
   140  	// The Amazon Resource Name (ARN) of the VPC Ingress Connection.
   141  	Arn pulumi.StringPtrInput
   142  	// The domain name associated with the VPC Ingress Connection resource.
   143  	DomainName pulumi.StringPtrInput
   144  	// Specifications for the customer’s Amazon VPC and the related AWS PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource. See Ingress VPC Configuration below for more details.
   145  	IngressVpcConfiguration VpcIngressConnectionIngressVpcConfigurationPtrInput
   146  	// A name for the VPC Ingress Connection resource. It must be unique across all the active VPC Ingress Connections in your AWS account in the AWS Region.
   147  	Name pulumi.StringPtrInput
   148  	// The Amazon Resource Name (ARN) for this App Runner service that is used to create the VPC Ingress Connection resource.
   149  	ServiceArn pulumi.StringPtrInput
   150  	// The current status of the VPC Ingress Connection.
   151  	Status pulumi.StringPtrInput
   152  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   153  	Tags pulumi.StringMapInput
   154  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   155  	//
   156  	// Deprecated: Please use `tags` instead.
   157  	TagsAll pulumi.StringMapInput
   158  }
   159  
   160  func (VpcIngressConnectionState) ElementType() reflect.Type {
   161  	return reflect.TypeOf((*vpcIngressConnectionState)(nil)).Elem()
   162  }
   163  
   164  type vpcIngressConnectionArgs struct {
   165  	// Specifications for the customer’s Amazon VPC and the related AWS PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource. See Ingress VPC Configuration below for more details.
   166  	IngressVpcConfiguration VpcIngressConnectionIngressVpcConfiguration `pulumi:"ingressVpcConfiguration"`
   167  	// A name for the VPC Ingress Connection resource. It must be unique across all the active VPC Ingress Connections in your AWS account in the AWS Region.
   168  	Name *string `pulumi:"name"`
   169  	// The Amazon Resource Name (ARN) for this App Runner service that is used to create the VPC Ingress Connection resource.
   170  	ServiceArn string `pulumi:"serviceArn"`
   171  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   172  	Tags map[string]string `pulumi:"tags"`
   173  }
   174  
   175  // The set of arguments for constructing a VpcIngressConnection resource.
   176  type VpcIngressConnectionArgs struct {
   177  	// Specifications for the customer’s Amazon VPC and the related AWS PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource. See Ingress VPC Configuration below for more details.
   178  	IngressVpcConfiguration VpcIngressConnectionIngressVpcConfigurationInput
   179  	// A name for the VPC Ingress Connection resource. It must be unique across all the active VPC Ingress Connections in your AWS account in the AWS Region.
   180  	Name pulumi.StringPtrInput
   181  	// The Amazon Resource Name (ARN) for this App Runner service that is used to create the VPC Ingress Connection resource.
   182  	ServiceArn pulumi.StringInput
   183  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   184  	Tags pulumi.StringMapInput
   185  }
   186  
   187  func (VpcIngressConnectionArgs) ElementType() reflect.Type {
   188  	return reflect.TypeOf((*vpcIngressConnectionArgs)(nil)).Elem()
   189  }
   190  
   191  type VpcIngressConnectionInput interface {
   192  	pulumi.Input
   193  
   194  	ToVpcIngressConnectionOutput() VpcIngressConnectionOutput
   195  	ToVpcIngressConnectionOutputWithContext(ctx context.Context) VpcIngressConnectionOutput
   196  }
   197  
   198  func (*VpcIngressConnection) ElementType() reflect.Type {
   199  	return reflect.TypeOf((**VpcIngressConnection)(nil)).Elem()
   200  }
   201  
   202  func (i *VpcIngressConnection) ToVpcIngressConnectionOutput() VpcIngressConnectionOutput {
   203  	return i.ToVpcIngressConnectionOutputWithContext(context.Background())
   204  }
   205  
   206  func (i *VpcIngressConnection) ToVpcIngressConnectionOutputWithContext(ctx context.Context) VpcIngressConnectionOutput {
   207  	return pulumi.ToOutputWithContext(ctx, i).(VpcIngressConnectionOutput)
   208  }
   209  
   210  // VpcIngressConnectionArrayInput is an input type that accepts VpcIngressConnectionArray and VpcIngressConnectionArrayOutput values.
   211  // You can construct a concrete instance of `VpcIngressConnectionArrayInput` via:
   212  //
   213  //	VpcIngressConnectionArray{ VpcIngressConnectionArgs{...} }
   214  type VpcIngressConnectionArrayInput interface {
   215  	pulumi.Input
   216  
   217  	ToVpcIngressConnectionArrayOutput() VpcIngressConnectionArrayOutput
   218  	ToVpcIngressConnectionArrayOutputWithContext(context.Context) VpcIngressConnectionArrayOutput
   219  }
   220  
   221  type VpcIngressConnectionArray []VpcIngressConnectionInput
   222  
   223  func (VpcIngressConnectionArray) ElementType() reflect.Type {
   224  	return reflect.TypeOf((*[]*VpcIngressConnection)(nil)).Elem()
   225  }
   226  
   227  func (i VpcIngressConnectionArray) ToVpcIngressConnectionArrayOutput() VpcIngressConnectionArrayOutput {
   228  	return i.ToVpcIngressConnectionArrayOutputWithContext(context.Background())
   229  }
   230  
   231  func (i VpcIngressConnectionArray) ToVpcIngressConnectionArrayOutputWithContext(ctx context.Context) VpcIngressConnectionArrayOutput {
   232  	return pulumi.ToOutputWithContext(ctx, i).(VpcIngressConnectionArrayOutput)
   233  }
   234  
   235  // VpcIngressConnectionMapInput is an input type that accepts VpcIngressConnectionMap and VpcIngressConnectionMapOutput values.
   236  // You can construct a concrete instance of `VpcIngressConnectionMapInput` via:
   237  //
   238  //	VpcIngressConnectionMap{ "key": VpcIngressConnectionArgs{...} }
   239  type VpcIngressConnectionMapInput interface {
   240  	pulumi.Input
   241  
   242  	ToVpcIngressConnectionMapOutput() VpcIngressConnectionMapOutput
   243  	ToVpcIngressConnectionMapOutputWithContext(context.Context) VpcIngressConnectionMapOutput
   244  }
   245  
   246  type VpcIngressConnectionMap map[string]VpcIngressConnectionInput
   247  
   248  func (VpcIngressConnectionMap) ElementType() reflect.Type {
   249  	return reflect.TypeOf((*map[string]*VpcIngressConnection)(nil)).Elem()
   250  }
   251  
   252  func (i VpcIngressConnectionMap) ToVpcIngressConnectionMapOutput() VpcIngressConnectionMapOutput {
   253  	return i.ToVpcIngressConnectionMapOutputWithContext(context.Background())
   254  }
   255  
   256  func (i VpcIngressConnectionMap) ToVpcIngressConnectionMapOutputWithContext(ctx context.Context) VpcIngressConnectionMapOutput {
   257  	return pulumi.ToOutputWithContext(ctx, i).(VpcIngressConnectionMapOutput)
   258  }
   259  
   260  type VpcIngressConnectionOutput struct{ *pulumi.OutputState }
   261  
   262  func (VpcIngressConnectionOutput) ElementType() reflect.Type {
   263  	return reflect.TypeOf((**VpcIngressConnection)(nil)).Elem()
   264  }
   265  
   266  func (o VpcIngressConnectionOutput) ToVpcIngressConnectionOutput() VpcIngressConnectionOutput {
   267  	return o
   268  }
   269  
   270  func (o VpcIngressConnectionOutput) ToVpcIngressConnectionOutputWithContext(ctx context.Context) VpcIngressConnectionOutput {
   271  	return o
   272  }
   273  
   274  // The Amazon Resource Name (ARN) of the VPC Ingress Connection.
   275  func (o VpcIngressConnectionOutput) Arn() pulumi.StringOutput {
   276  	return o.ApplyT(func(v *VpcIngressConnection) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   277  }
   278  
   279  // The domain name associated with the VPC Ingress Connection resource.
   280  func (o VpcIngressConnectionOutput) DomainName() pulumi.StringOutput {
   281  	return o.ApplyT(func(v *VpcIngressConnection) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput)
   282  }
   283  
   284  // Specifications for the customer’s Amazon VPC and the related AWS PrivateLink VPC endpoint that are used to create the VPC Ingress Connection resource. See Ingress VPC Configuration below for more details.
   285  func (o VpcIngressConnectionOutput) IngressVpcConfiguration() VpcIngressConnectionIngressVpcConfigurationOutput {
   286  	return o.ApplyT(func(v *VpcIngressConnection) VpcIngressConnectionIngressVpcConfigurationOutput {
   287  		return v.IngressVpcConfiguration
   288  	}).(VpcIngressConnectionIngressVpcConfigurationOutput)
   289  }
   290  
   291  // A name for the VPC Ingress Connection resource. It must be unique across all the active VPC Ingress Connections in your AWS account in the AWS Region.
   292  func (o VpcIngressConnectionOutput) Name() pulumi.StringOutput {
   293  	return o.ApplyT(func(v *VpcIngressConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   294  }
   295  
   296  // The Amazon Resource Name (ARN) for this App Runner service that is used to create the VPC Ingress Connection resource.
   297  func (o VpcIngressConnectionOutput) ServiceArn() pulumi.StringOutput {
   298  	return o.ApplyT(func(v *VpcIngressConnection) pulumi.StringOutput { return v.ServiceArn }).(pulumi.StringOutput)
   299  }
   300  
   301  // The current status of the VPC Ingress Connection.
   302  func (o VpcIngressConnectionOutput) Status() pulumi.StringOutput {
   303  	return o.ApplyT(func(v *VpcIngressConnection) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   304  }
   305  
   306  // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   307  func (o VpcIngressConnectionOutput) Tags() pulumi.StringMapOutput {
   308  	return o.ApplyT(func(v *VpcIngressConnection) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   309  }
   310  
   311  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   312  //
   313  // Deprecated: Please use `tags` instead.
   314  func (o VpcIngressConnectionOutput) TagsAll() pulumi.StringMapOutput {
   315  	return o.ApplyT(func(v *VpcIngressConnection) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   316  }
   317  
   318  type VpcIngressConnectionArrayOutput struct{ *pulumi.OutputState }
   319  
   320  func (VpcIngressConnectionArrayOutput) ElementType() reflect.Type {
   321  	return reflect.TypeOf((*[]*VpcIngressConnection)(nil)).Elem()
   322  }
   323  
   324  func (o VpcIngressConnectionArrayOutput) ToVpcIngressConnectionArrayOutput() VpcIngressConnectionArrayOutput {
   325  	return o
   326  }
   327  
   328  func (o VpcIngressConnectionArrayOutput) ToVpcIngressConnectionArrayOutputWithContext(ctx context.Context) VpcIngressConnectionArrayOutput {
   329  	return o
   330  }
   331  
   332  func (o VpcIngressConnectionArrayOutput) Index(i pulumi.IntInput) VpcIngressConnectionOutput {
   333  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpcIngressConnection {
   334  		return vs[0].([]*VpcIngressConnection)[vs[1].(int)]
   335  	}).(VpcIngressConnectionOutput)
   336  }
   337  
   338  type VpcIngressConnectionMapOutput struct{ *pulumi.OutputState }
   339  
   340  func (VpcIngressConnectionMapOutput) ElementType() reflect.Type {
   341  	return reflect.TypeOf((*map[string]*VpcIngressConnection)(nil)).Elem()
   342  }
   343  
   344  func (o VpcIngressConnectionMapOutput) ToVpcIngressConnectionMapOutput() VpcIngressConnectionMapOutput {
   345  	return o
   346  }
   347  
   348  func (o VpcIngressConnectionMapOutput) ToVpcIngressConnectionMapOutputWithContext(ctx context.Context) VpcIngressConnectionMapOutput {
   349  	return o
   350  }
   351  
   352  func (o VpcIngressConnectionMapOutput) MapIndex(k pulumi.StringInput) VpcIngressConnectionOutput {
   353  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpcIngressConnection {
   354  		return vs[0].(map[string]*VpcIngressConnection)[vs[1].(string)]
   355  	}).(VpcIngressConnectionOutput)
   356  }
   357  
   358  func init() {
   359  	pulumi.RegisterInputType(reflect.TypeOf((*VpcIngressConnectionInput)(nil)).Elem(), &VpcIngressConnection{})
   360  	pulumi.RegisterInputType(reflect.TypeOf((*VpcIngressConnectionArrayInput)(nil)).Elem(), VpcIngressConnectionArray{})
   361  	pulumi.RegisterInputType(reflect.TypeOf((*VpcIngressConnectionMapInput)(nil)).Elem(), VpcIngressConnectionMap{})
   362  	pulumi.RegisterOutputType(VpcIngressConnectionOutput{})
   363  	pulumi.RegisterOutputType(VpcIngressConnectionArrayOutput{})
   364  	pulumi.RegisterOutputType(VpcIngressConnectionMapOutput{})
   365  }