github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/networkmanager/siteToSiteVpnAttachment.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 networkmanager 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 // Resource for managing an AWS Network Manager SiteToSiteAttachment. 16 // 17 // ## Example Usage 18 // 19 // ### Basic Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := networkmanager.NewSiteToSiteVpnAttachment(ctx, "example", &networkmanager.SiteToSiteVpnAttachmentArgs{ 35 // CoreNetworkId: pulumi.Any(exampleAwsccNetworkmanagerCoreNetwork.Id), 36 // VpnConnectionArn: pulumi.Any(exampleAwsVpnConnection.Arn), 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 // 48 // ## Import 49 // 50 // Using `pulumi import`, import `aws_networkmanager_site_to_site_vpn_attachment` using the attachment ID. For example: 51 // 52 // ```sh 53 // $ pulumi import aws:networkmanager/siteToSiteVpnAttachment:SiteToSiteVpnAttachment example attachment-0f8fa60d2238d1bd8 54 // ``` 55 type SiteToSiteVpnAttachment struct { 56 pulumi.CustomResourceState 57 58 // The ARN of the attachment. 59 Arn pulumi.StringOutput `pulumi:"arn"` 60 // The policy rule number associated with the attachment. 61 AttachmentPolicyRuleNumber pulumi.IntOutput `pulumi:"attachmentPolicyRuleNumber"` 62 // The type of attachment. 63 AttachmentType pulumi.StringOutput `pulumi:"attachmentType"` 64 // The ARN of a core network. 65 CoreNetworkArn pulumi.StringOutput `pulumi:"coreNetworkArn"` 66 // The ID of a core network for the VPN attachment. 67 CoreNetworkId pulumi.StringOutput `pulumi:"coreNetworkId"` 68 // The Region where the edge is located. 69 EdgeLocation pulumi.StringOutput `pulumi:"edgeLocation"` 70 // The ID of the attachment account owner. 71 OwnerAccountId pulumi.StringOutput `pulumi:"ownerAccountId"` 72 // The attachment resource ARN. 73 ResourceArn pulumi.StringOutput `pulumi:"resourceArn"` 74 // The name of the segment attachment. 75 SegmentName pulumi.StringOutput `pulumi:"segmentName"` 76 // The state of the attachment. 77 State pulumi.StringOutput `pulumi:"state"` 78 // Key-value tags for the attachment. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 79 Tags pulumi.StringMapOutput `pulumi:"tags"` 80 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 81 // 82 // Deprecated: Please use `tags` instead. 83 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 84 // The ARN of the site-to-site VPN connection. 85 // 86 // The following arguments are optional: 87 VpnConnectionArn pulumi.StringOutput `pulumi:"vpnConnectionArn"` 88 } 89 90 // NewSiteToSiteVpnAttachment registers a new resource with the given unique name, arguments, and options. 91 func NewSiteToSiteVpnAttachment(ctx *pulumi.Context, 92 name string, args *SiteToSiteVpnAttachmentArgs, opts ...pulumi.ResourceOption) (*SiteToSiteVpnAttachment, error) { 93 if args == nil { 94 return nil, errors.New("missing one or more required arguments") 95 } 96 97 if args.CoreNetworkId == nil { 98 return nil, errors.New("invalid value for required argument 'CoreNetworkId'") 99 } 100 if args.VpnConnectionArn == nil { 101 return nil, errors.New("invalid value for required argument 'VpnConnectionArn'") 102 } 103 opts = internal.PkgResourceDefaultOpts(opts) 104 var resource SiteToSiteVpnAttachment 105 err := ctx.RegisterResource("aws:networkmanager/siteToSiteVpnAttachment:SiteToSiteVpnAttachment", name, args, &resource, opts...) 106 if err != nil { 107 return nil, err 108 } 109 return &resource, nil 110 } 111 112 // GetSiteToSiteVpnAttachment gets an existing SiteToSiteVpnAttachment resource's state with the given name, ID, and optional 113 // state properties that are used to uniquely qualify the lookup (nil if not required). 114 func GetSiteToSiteVpnAttachment(ctx *pulumi.Context, 115 name string, id pulumi.IDInput, state *SiteToSiteVpnAttachmentState, opts ...pulumi.ResourceOption) (*SiteToSiteVpnAttachment, error) { 116 var resource SiteToSiteVpnAttachment 117 err := ctx.ReadResource("aws:networkmanager/siteToSiteVpnAttachment:SiteToSiteVpnAttachment", name, id, state, &resource, opts...) 118 if err != nil { 119 return nil, err 120 } 121 return &resource, nil 122 } 123 124 // Input properties used for looking up and filtering SiteToSiteVpnAttachment resources. 125 type siteToSiteVpnAttachmentState struct { 126 // The ARN of the attachment. 127 Arn *string `pulumi:"arn"` 128 // The policy rule number associated with the attachment. 129 AttachmentPolicyRuleNumber *int `pulumi:"attachmentPolicyRuleNumber"` 130 // The type of attachment. 131 AttachmentType *string `pulumi:"attachmentType"` 132 // The ARN of a core network. 133 CoreNetworkArn *string `pulumi:"coreNetworkArn"` 134 // The ID of a core network for the VPN attachment. 135 CoreNetworkId *string `pulumi:"coreNetworkId"` 136 // The Region where the edge is located. 137 EdgeLocation *string `pulumi:"edgeLocation"` 138 // The ID of the attachment account owner. 139 OwnerAccountId *string `pulumi:"ownerAccountId"` 140 // The attachment resource ARN. 141 ResourceArn *string `pulumi:"resourceArn"` 142 // The name of the segment attachment. 143 SegmentName *string `pulumi:"segmentName"` 144 // The state of the attachment. 145 State *string `pulumi:"state"` 146 // Key-value tags for the attachment. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 147 Tags map[string]string `pulumi:"tags"` 148 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 149 // 150 // Deprecated: Please use `tags` instead. 151 TagsAll map[string]string `pulumi:"tagsAll"` 152 // The ARN of the site-to-site VPN connection. 153 // 154 // The following arguments are optional: 155 VpnConnectionArn *string `pulumi:"vpnConnectionArn"` 156 } 157 158 type SiteToSiteVpnAttachmentState struct { 159 // The ARN of the attachment. 160 Arn pulumi.StringPtrInput 161 // The policy rule number associated with the attachment. 162 AttachmentPolicyRuleNumber pulumi.IntPtrInput 163 // The type of attachment. 164 AttachmentType pulumi.StringPtrInput 165 // The ARN of a core network. 166 CoreNetworkArn pulumi.StringPtrInput 167 // The ID of a core network for the VPN attachment. 168 CoreNetworkId pulumi.StringPtrInput 169 // The Region where the edge is located. 170 EdgeLocation pulumi.StringPtrInput 171 // The ID of the attachment account owner. 172 OwnerAccountId pulumi.StringPtrInput 173 // The attachment resource ARN. 174 ResourceArn pulumi.StringPtrInput 175 // The name of the segment attachment. 176 SegmentName pulumi.StringPtrInput 177 // The state of the attachment. 178 State pulumi.StringPtrInput 179 // Key-value tags for the attachment. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 180 Tags pulumi.StringMapInput 181 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 182 // 183 // Deprecated: Please use `tags` instead. 184 TagsAll pulumi.StringMapInput 185 // The ARN of the site-to-site VPN connection. 186 // 187 // The following arguments are optional: 188 VpnConnectionArn pulumi.StringPtrInput 189 } 190 191 func (SiteToSiteVpnAttachmentState) ElementType() reflect.Type { 192 return reflect.TypeOf((*siteToSiteVpnAttachmentState)(nil)).Elem() 193 } 194 195 type siteToSiteVpnAttachmentArgs struct { 196 // The ID of a core network for the VPN attachment. 197 CoreNetworkId string `pulumi:"coreNetworkId"` 198 // Key-value tags for the attachment. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 199 Tags map[string]string `pulumi:"tags"` 200 // The ARN of the site-to-site VPN connection. 201 // 202 // The following arguments are optional: 203 VpnConnectionArn string `pulumi:"vpnConnectionArn"` 204 } 205 206 // The set of arguments for constructing a SiteToSiteVpnAttachment resource. 207 type SiteToSiteVpnAttachmentArgs struct { 208 // The ID of a core network for the VPN attachment. 209 CoreNetworkId pulumi.StringInput 210 // Key-value tags for the attachment. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 211 Tags pulumi.StringMapInput 212 // The ARN of the site-to-site VPN connection. 213 // 214 // The following arguments are optional: 215 VpnConnectionArn pulumi.StringInput 216 } 217 218 func (SiteToSiteVpnAttachmentArgs) ElementType() reflect.Type { 219 return reflect.TypeOf((*siteToSiteVpnAttachmentArgs)(nil)).Elem() 220 } 221 222 type SiteToSiteVpnAttachmentInput interface { 223 pulumi.Input 224 225 ToSiteToSiteVpnAttachmentOutput() SiteToSiteVpnAttachmentOutput 226 ToSiteToSiteVpnAttachmentOutputWithContext(ctx context.Context) SiteToSiteVpnAttachmentOutput 227 } 228 229 func (*SiteToSiteVpnAttachment) ElementType() reflect.Type { 230 return reflect.TypeOf((**SiteToSiteVpnAttachment)(nil)).Elem() 231 } 232 233 func (i *SiteToSiteVpnAttachment) ToSiteToSiteVpnAttachmentOutput() SiteToSiteVpnAttachmentOutput { 234 return i.ToSiteToSiteVpnAttachmentOutputWithContext(context.Background()) 235 } 236 237 func (i *SiteToSiteVpnAttachment) ToSiteToSiteVpnAttachmentOutputWithContext(ctx context.Context) SiteToSiteVpnAttachmentOutput { 238 return pulumi.ToOutputWithContext(ctx, i).(SiteToSiteVpnAttachmentOutput) 239 } 240 241 // SiteToSiteVpnAttachmentArrayInput is an input type that accepts SiteToSiteVpnAttachmentArray and SiteToSiteVpnAttachmentArrayOutput values. 242 // You can construct a concrete instance of `SiteToSiteVpnAttachmentArrayInput` via: 243 // 244 // SiteToSiteVpnAttachmentArray{ SiteToSiteVpnAttachmentArgs{...} } 245 type SiteToSiteVpnAttachmentArrayInput interface { 246 pulumi.Input 247 248 ToSiteToSiteVpnAttachmentArrayOutput() SiteToSiteVpnAttachmentArrayOutput 249 ToSiteToSiteVpnAttachmentArrayOutputWithContext(context.Context) SiteToSiteVpnAttachmentArrayOutput 250 } 251 252 type SiteToSiteVpnAttachmentArray []SiteToSiteVpnAttachmentInput 253 254 func (SiteToSiteVpnAttachmentArray) ElementType() reflect.Type { 255 return reflect.TypeOf((*[]*SiteToSiteVpnAttachment)(nil)).Elem() 256 } 257 258 func (i SiteToSiteVpnAttachmentArray) ToSiteToSiteVpnAttachmentArrayOutput() SiteToSiteVpnAttachmentArrayOutput { 259 return i.ToSiteToSiteVpnAttachmentArrayOutputWithContext(context.Background()) 260 } 261 262 func (i SiteToSiteVpnAttachmentArray) ToSiteToSiteVpnAttachmentArrayOutputWithContext(ctx context.Context) SiteToSiteVpnAttachmentArrayOutput { 263 return pulumi.ToOutputWithContext(ctx, i).(SiteToSiteVpnAttachmentArrayOutput) 264 } 265 266 // SiteToSiteVpnAttachmentMapInput is an input type that accepts SiteToSiteVpnAttachmentMap and SiteToSiteVpnAttachmentMapOutput values. 267 // You can construct a concrete instance of `SiteToSiteVpnAttachmentMapInput` via: 268 // 269 // SiteToSiteVpnAttachmentMap{ "key": SiteToSiteVpnAttachmentArgs{...} } 270 type SiteToSiteVpnAttachmentMapInput interface { 271 pulumi.Input 272 273 ToSiteToSiteVpnAttachmentMapOutput() SiteToSiteVpnAttachmentMapOutput 274 ToSiteToSiteVpnAttachmentMapOutputWithContext(context.Context) SiteToSiteVpnAttachmentMapOutput 275 } 276 277 type SiteToSiteVpnAttachmentMap map[string]SiteToSiteVpnAttachmentInput 278 279 func (SiteToSiteVpnAttachmentMap) ElementType() reflect.Type { 280 return reflect.TypeOf((*map[string]*SiteToSiteVpnAttachment)(nil)).Elem() 281 } 282 283 func (i SiteToSiteVpnAttachmentMap) ToSiteToSiteVpnAttachmentMapOutput() SiteToSiteVpnAttachmentMapOutput { 284 return i.ToSiteToSiteVpnAttachmentMapOutputWithContext(context.Background()) 285 } 286 287 func (i SiteToSiteVpnAttachmentMap) ToSiteToSiteVpnAttachmentMapOutputWithContext(ctx context.Context) SiteToSiteVpnAttachmentMapOutput { 288 return pulumi.ToOutputWithContext(ctx, i).(SiteToSiteVpnAttachmentMapOutput) 289 } 290 291 type SiteToSiteVpnAttachmentOutput struct{ *pulumi.OutputState } 292 293 func (SiteToSiteVpnAttachmentOutput) ElementType() reflect.Type { 294 return reflect.TypeOf((**SiteToSiteVpnAttachment)(nil)).Elem() 295 } 296 297 func (o SiteToSiteVpnAttachmentOutput) ToSiteToSiteVpnAttachmentOutput() SiteToSiteVpnAttachmentOutput { 298 return o 299 } 300 301 func (o SiteToSiteVpnAttachmentOutput) ToSiteToSiteVpnAttachmentOutputWithContext(ctx context.Context) SiteToSiteVpnAttachmentOutput { 302 return o 303 } 304 305 // The ARN of the attachment. 306 func (o SiteToSiteVpnAttachmentOutput) Arn() pulumi.StringOutput { 307 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 308 } 309 310 // The policy rule number associated with the attachment. 311 func (o SiteToSiteVpnAttachmentOutput) AttachmentPolicyRuleNumber() pulumi.IntOutput { 312 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.IntOutput { return v.AttachmentPolicyRuleNumber }).(pulumi.IntOutput) 313 } 314 315 // The type of attachment. 316 func (o SiteToSiteVpnAttachmentOutput) AttachmentType() pulumi.StringOutput { 317 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.AttachmentType }).(pulumi.StringOutput) 318 } 319 320 // The ARN of a core network. 321 func (o SiteToSiteVpnAttachmentOutput) CoreNetworkArn() pulumi.StringOutput { 322 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.CoreNetworkArn }).(pulumi.StringOutput) 323 } 324 325 // The ID of a core network for the VPN attachment. 326 func (o SiteToSiteVpnAttachmentOutput) CoreNetworkId() pulumi.StringOutput { 327 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.CoreNetworkId }).(pulumi.StringOutput) 328 } 329 330 // The Region where the edge is located. 331 func (o SiteToSiteVpnAttachmentOutput) EdgeLocation() pulumi.StringOutput { 332 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.EdgeLocation }).(pulumi.StringOutput) 333 } 334 335 // The ID of the attachment account owner. 336 func (o SiteToSiteVpnAttachmentOutput) OwnerAccountId() pulumi.StringOutput { 337 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.OwnerAccountId }).(pulumi.StringOutput) 338 } 339 340 // The attachment resource ARN. 341 func (o SiteToSiteVpnAttachmentOutput) ResourceArn() pulumi.StringOutput { 342 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.ResourceArn }).(pulumi.StringOutput) 343 } 344 345 // The name of the segment attachment. 346 func (o SiteToSiteVpnAttachmentOutput) SegmentName() pulumi.StringOutput { 347 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.SegmentName }).(pulumi.StringOutput) 348 } 349 350 // The state of the attachment. 351 func (o SiteToSiteVpnAttachmentOutput) State() pulumi.StringOutput { 352 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.State }).(pulumi.StringOutput) 353 } 354 355 // Key-value tags for the attachment. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 356 func (o SiteToSiteVpnAttachmentOutput) Tags() pulumi.StringMapOutput { 357 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 358 } 359 360 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 361 // 362 // Deprecated: Please use `tags` instead. 363 func (o SiteToSiteVpnAttachmentOutput) TagsAll() pulumi.StringMapOutput { 364 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 365 } 366 367 // The ARN of the site-to-site VPN connection. 368 // 369 // The following arguments are optional: 370 func (o SiteToSiteVpnAttachmentOutput) VpnConnectionArn() pulumi.StringOutput { 371 return o.ApplyT(func(v *SiteToSiteVpnAttachment) pulumi.StringOutput { return v.VpnConnectionArn }).(pulumi.StringOutput) 372 } 373 374 type SiteToSiteVpnAttachmentArrayOutput struct{ *pulumi.OutputState } 375 376 func (SiteToSiteVpnAttachmentArrayOutput) ElementType() reflect.Type { 377 return reflect.TypeOf((*[]*SiteToSiteVpnAttachment)(nil)).Elem() 378 } 379 380 func (o SiteToSiteVpnAttachmentArrayOutput) ToSiteToSiteVpnAttachmentArrayOutput() SiteToSiteVpnAttachmentArrayOutput { 381 return o 382 } 383 384 func (o SiteToSiteVpnAttachmentArrayOutput) ToSiteToSiteVpnAttachmentArrayOutputWithContext(ctx context.Context) SiteToSiteVpnAttachmentArrayOutput { 385 return o 386 } 387 388 func (o SiteToSiteVpnAttachmentArrayOutput) Index(i pulumi.IntInput) SiteToSiteVpnAttachmentOutput { 389 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SiteToSiteVpnAttachment { 390 return vs[0].([]*SiteToSiteVpnAttachment)[vs[1].(int)] 391 }).(SiteToSiteVpnAttachmentOutput) 392 } 393 394 type SiteToSiteVpnAttachmentMapOutput struct{ *pulumi.OutputState } 395 396 func (SiteToSiteVpnAttachmentMapOutput) ElementType() reflect.Type { 397 return reflect.TypeOf((*map[string]*SiteToSiteVpnAttachment)(nil)).Elem() 398 } 399 400 func (o SiteToSiteVpnAttachmentMapOutput) ToSiteToSiteVpnAttachmentMapOutput() SiteToSiteVpnAttachmentMapOutput { 401 return o 402 } 403 404 func (o SiteToSiteVpnAttachmentMapOutput) ToSiteToSiteVpnAttachmentMapOutputWithContext(ctx context.Context) SiteToSiteVpnAttachmentMapOutput { 405 return o 406 } 407 408 func (o SiteToSiteVpnAttachmentMapOutput) MapIndex(k pulumi.StringInput) SiteToSiteVpnAttachmentOutput { 409 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SiteToSiteVpnAttachment { 410 return vs[0].(map[string]*SiteToSiteVpnAttachment)[vs[1].(string)] 411 }).(SiteToSiteVpnAttachmentOutput) 412 } 413 414 func init() { 415 pulumi.RegisterInputType(reflect.TypeOf((*SiteToSiteVpnAttachmentInput)(nil)).Elem(), &SiteToSiteVpnAttachment{}) 416 pulumi.RegisterInputType(reflect.TypeOf((*SiteToSiteVpnAttachmentArrayInput)(nil)).Elem(), SiteToSiteVpnAttachmentArray{}) 417 pulumi.RegisterInputType(reflect.TypeOf((*SiteToSiteVpnAttachmentMapInput)(nil)).Elem(), SiteToSiteVpnAttachmentMap{}) 418 pulumi.RegisterOutputType(SiteToSiteVpnAttachmentOutput{}) 419 pulumi.RegisterOutputType(SiteToSiteVpnAttachmentArrayOutput{}) 420 pulumi.RegisterOutputType(SiteToSiteVpnAttachmentMapOutput{}) 421 }