github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/getInstance.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 ec2 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Use this data source to get the ID of an Amazon EC2 Instance for use in other resources. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := ec2.LookupInstance(ctx, &ec2.LookupInstanceArgs{ 32 // InstanceId: pulumi.StringRef("i-instanceid"), 33 // Filters: []ec2.GetInstanceFilter{ 34 // { 35 // Name: "image-id", 36 // Values: []string{ 37 // "ami-xxxxxxxx", 38 // }, 39 // }, 40 // { 41 // Name: "tag:Name", 42 // Values: []string{ 43 // "instance-name-tag", 44 // }, 45 // }, 46 // }, 47 // }, nil) 48 // if err != nil { 49 // return err 50 // } 51 // return nil 52 // }) 53 // } 54 // 55 // ``` 56 // <!--End PulumiCodeChooser --> 57 func LookupInstance(ctx *pulumi.Context, args *LookupInstanceArgs, opts ...pulumi.InvokeOption) (*LookupInstanceResult, error) { 58 opts = internal.PkgInvokeDefaultOpts(opts) 59 var rv LookupInstanceResult 60 err := ctx.Invoke("aws:ec2/getInstance:getInstance", args, &rv, opts...) 61 if err != nil { 62 return nil, err 63 } 64 return &rv, nil 65 } 66 67 // A collection of arguments for invoking getInstance. 68 type LookupInstanceArgs struct { 69 // One or more name/value pairs to use as filters. There are 70 // several valid keys, for a full reference, check out 71 // [describe-instances in the AWS CLI reference][1]. 72 Filters []GetInstanceFilter `pulumi:"filters"` 73 // If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information. 74 GetPasswordData *bool `pulumi:"getPasswordData"` 75 // Retrieve Base64 encoded User Data contents into the `userDataBase64` attribute. A SHA-1 hash of the User Data contents will always be present in the `userData` attribute. Defaults to `false`. 76 // 77 // > **NOTE:** At least one of `filter`, `instanceTags`, or `instanceId` must be specified. 78 // 79 // > **NOTE:** If anything other than a single match is returned by the search, 80 // this call will fail. Ensure that your search is specific enough to return 81 // a single Instance ID only. 82 GetUserData *bool `pulumi:"getUserData"` 83 // Specify the exact Instance ID with which to populate the data source. 84 InstanceId *string `pulumi:"instanceId"` 85 // Map of tags, each pair of which must 86 // exactly match a pair on the desired Instance. 87 InstanceTags map[string]string `pulumi:"instanceTags"` 88 // Map of tags assigned to the Instance. 89 Tags map[string]string `pulumi:"tags"` 90 } 91 92 // A collection of values returned by getInstance. 93 type LookupInstanceResult struct { 94 // ID of the AMI used to launch the instance. 95 Ami string `pulumi:"ami"` 96 // ARN of the instance. 97 Arn string `pulumi:"arn"` 98 // Whether or not the Instance is associated with a public IP address or not (Boolean). 99 AssociatePublicIpAddress bool `pulumi:"associatePublicIpAddress"` 100 // Availability zone of the Instance. 101 AvailabilityZone string `pulumi:"availabilityZone"` 102 // Credit specification of the Instance. 103 CreditSpecifications []GetInstanceCreditSpecification `pulumi:"creditSpecifications"` 104 // Whether or not EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection) is enabled (Boolean). 105 DisableApiStop bool `pulumi:"disableApiStop"` 106 // Whether or not [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination) is enabled (Boolean). 107 DisableApiTermination bool `pulumi:"disableApiTermination"` 108 // EBS block device mappings of the Instance. 109 EbsBlockDevices []GetInstanceEbsBlockDevice `pulumi:"ebsBlockDevices"` 110 // Whether the Instance is EBS optimized or not (Boolean). 111 EbsOptimized bool `pulumi:"ebsOptimized"` 112 // Enclave options of the instance. 113 EnclaveOptions []GetInstanceEnclaveOption `pulumi:"enclaveOptions"` 114 // Ephemeral block device mappings of the Instance. 115 EphemeralBlockDevices []GetInstanceEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"` 116 Filters []GetInstanceFilter `pulumi:"filters"` 117 GetPasswordData *bool `pulumi:"getPasswordData"` 118 GetUserData *bool `pulumi:"getUserData"` 119 // ID of the dedicated host the instance will be assigned to. 120 HostId string `pulumi:"hostId"` 121 // ARN of the host resource group the instance is associated with. 122 HostResourceGroupArn string `pulumi:"hostResourceGroupArn"` 123 // Name of the instance profile associated with the Instance. 124 IamInstanceProfile string `pulumi:"iamInstanceProfile"` 125 // The provider-assigned unique ID for this managed resource. 126 Id string `pulumi:"id"` 127 InstanceId *string `pulumi:"instanceId"` 128 // State of the instance. One of: `pending`, `running`, `shutting-down`, `terminated`, `stopping`, `stopped`. See [Instance Lifecycle](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) for more information. 129 InstanceState string `pulumi:"instanceState"` 130 InstanceTags map[string]string `pulumi:"instanceTags"` 131 // Type of the Instance. 132 InstanceType string `pulumi:"instanceType"` 133 // IPv6 addresses associated to the Instance, if applicable. **NOTE**: Unlike the IPv4 address, this doesn't change if you attach an EIP to the instance. 134 Ipv6Addresses []string `pulumi:"ipv6Addresses"` 135 // Key name of the Instance. 136 KeyName string `pulumi:"keyName"` 137 // Maintenance and recovery options for the instance. 138 MaintenanceOptions []GetInstanceMaintenanceOption `pulumi:"maintenanceOptions"` 139 // Metadata options of the Instance. 140 MetadataOptions []GetInstanceMetadataOption `pulumi:"metadataOptions"` 141 // Whether detailed monitoring is enabled or disabled for the Instance (Boolean). 142 Monitoring bool `pulumi:"monitoring"` 143 // ID of the network interface that was created with the Instance. 144 NetworkInterfaceId string `pulumi:"networkInterfaceId"` 145 // ARN of the Outpost. 146 OutpostArn string `pulumi:"outpostArn"` 147 // Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password for instances running Microsoft Windows. This attribute is only exported if `getPasswordData` is true. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information. 148 PasswordData string `pulumi:"passwordData"` 149 // Placement group of the Instance. 150 PlacementGroup string `pulumi:"placementGroup"` 151 // Number of the partition the instance is in. 152 PlacementPartitionNumber int `pulumi:"placementPartitionNumber"` 153 // Private DNS name assigned to the Instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC. 154 PrivateDns string `pulumi:"privateDns"` 155 // Options for the instance hostname. 156 PrivateDnsNameOptions []GetInstancePrivateDnsNameOption `pulumi:"privateDnsNameOptions"` 157 // Private IP address assigned to the Instance. 158 PrivateIp string `pulumi:"privateIp"` 159 // Public DNS name assigned to the Instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC. 160 PublicDns string `pulumi:"publicDns"` 161 // Public IP address assigned to the Instance, if applicable. **NOTE**: If you are using an `ec2.Eip` with your instance, you should refer to the EIP's address directly and not use `publicIp`, as this field will change after the EIP is attached. 162 PublicIp string `pulumi:"publicIp"` 163 // Root block device mappings of the Instance 164 RootBlockDevices []GetInstanceRootBlockDevice `pulumi:"rootBlockDevices"` 165 // Secondary private IPv4 addresses assigned to the instance's primary network interface (eth0) in a VPC. 166 SecondaryPrivateIps []string `pulumi:"secondaryPrivateIps"` 167 // Associated security groups. 168 SecurityGroups []string `pulumi:"securityGroups"` 169 // Whether the network interface performs source/destination checking (Boolean). 170 SourceDestCheck bool `pulumi:"sourceDestCheck"` 171 // VPC subnet ID. 172 SubnetId string `pulumi:"subnetId"` 173 // Map of tags assigned to the Instance. 174 Tags map[string]string `pulumi:"tags"` 175 // Tenancy of the instance: `dedicated`, `default`, `host`. 176 Tenancy string `pulumi:"tenancy"` 177 // SHA-1 hash of User Data supplied to the Instance. 178 UserData string `pulumi:"userData"` 179 // Base64 encoded contents of User Data supplied to the Instance. This attribute is only exported if `getUserData` is true. 180 UserDataBase64 string `pulumi:"userDataBase64"` 181 // Associated security groups in a non-default VPC. 182 VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"` 183 } 184 185 func LookupInstanceOutput(ctx *pulumi.Context, args LookupInstanceOutputArgs, opts ...pulumi.InvokeOption) LookupInstanceResultOutput { 186 return pulumi.ToOutputWithContext(context.Background(), args). 187 ApplyT(func(v interface{}) (LookupInstanceResult, error) { 188 args := v.(LookupInstanceArgs) 189 r, err := LookupInstance(ctx, &args, opts...) 190 var s LookupInstanceResult 191 if r != nil { 192 s = *r 193 } 194 return s, err 195 }).(LookupInstanceResultOutput) 196 } 197 198 // A collection of arguments for invoking getInstance. 199 type LookupInstanceOutputArgs struct { 200 // One or more name/value pairs to use as filters. There are 201 // several valid keys, for a full reference, check out 202 // [describe-instances in the AWS CLI reference][1]. 203 Filters GetInstanceFilterArrayInput `pulumi:"filters"` 204 // If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the `passwordData` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information. 205 GetPasswordData pulumi.BoolPtrInput `pulumi:"getPasswordData"` 206 // Retrieve Base64 encoded User Data contents into the `userDataBase64` attribute. A SHA-1 hash of the User Data contents will always be present in the `userData` attribute. Defaults to `false`. 207 // 208 // > **NOTE:** At least one of `filter`, `instanceTags`, or `instanceId` must be specified. 209 // 210 // > **NOTE:** If anything other than a single match is returned by the search, 211 // this call will fail. Ensure that your search is specific enough to return 212 // a single Instance ID only. 213 GetUserData pulumi.BoolPtrInput `pulumi:"getUserData"` 214 // Specify the exact Instance ID with which to populate the data source. 215 InstanceId pulumi.StringPtrInput `pulumi:"instanceId"` 216 // Map of tags, each pair of which must 217 // exactly match a pair on the desired Instance. 218 InstanceTags pulumi.StringMapInput `pulumi:"instanceTags"` 219 // Map of tags assigned to the Instance. 220 Tags pulumi.StringMapInput `pulumi:"tags"` 221 } 222 223 func (LookupInstanceOutputArgs) ElementType() reflect.Type { 224 return reflect.TypeOf((*LookupInstanceArgs)(nil)).Elem() 225 } 226 227 // A collection of values returned by getInstance. 228 type LookupInstanceResultOutput struct{ *pulumi.OutputState } 229 230 func (LookupInstanceResultOutput) ElementType() reflect.Type { 231 return reflect.TypeOf((*LookupInstanceResult)(nil)).Elem() 232 } 233 234 func (o LookupInstanceResultOutput) ToLookupInstanceResultOutput() LookupInstanceResultOutput { 235 return o 236 } 237 238 func (o LookupInstanceResultOutput) ToLookupInstanceResultOutputWithContext(ctx context.Context) LookupInstanceResultOutput { 239 return o 240 } 241 242 // ID of the AMI used to launch the instance. 243 func (o LookupInstanceResultOutput) Ami() pulumi.StringOutput { 244 return o.ApplyT(func(v LookupInstanceResult) string { return v.Ami }).(pulumi.StringOutput) 245 } 246 247 // ARN of the instance. 248 func (o LookupInstanceResultOutput) Arn() pulumi.StringOutput { 249 return o.ApplyT(func(v LookupInstanceResult) string { return v.Arn }).(pulumi.StringOutput) 250 } 251 252 // Whether or not the Instance is associated with a public IP address or not (Boolean). 253 func (o LookupInstanceResultOutput) AssociatePublicIpAddress() pulumi.BoolOutput { 254 return o.ApplyT(func(v LookupInstanceResult) bool { return v.AssociatePublicIpAddress }).(pulumi.BoolOutput) 255 } 256 257 // Availability zone of the Instance. 258 func (o LookupInstanceResultOutput) AvailabilityZone() pulumi.StringOutput { 259 return o.ApplyT(func(v LookupInstanceResult) string { return v.AvailabilityZone }).(pulumi.StringOutput) 260 } 261 262 // Credit specification of the Instance. 263 func (o LookupInstanceResultOutput) CreditSpecifications() GetInstanceCreditSpecificationArrayOutput { 264 return o.ApplyT(func(v LookupInstanceResult) []GetInstanceCreditSpecification { return v.CreditSpecifications }).(GetInstanceCreditSpecificationArrayOutput) 265 } 266 267 // Whether or not EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection) is enabled (Boolean). 268 func (o LookupInstanceResultOutput) DisableApiStop() pulumi.BoolOutput { 269 return o.ApplyT(func(v LookupInstanceResult) bool { return v.DisableApiStop }).(pulumi.BoolOutput) 270 } 271 272 // Whether or not [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination) is enabled (Boolean). 273 func (o LookupInstanceResultOutput) DisableApiTermination() pulumi.BoolOutput { 274 return o.ApplyT(func(v LookupInstanceResult) bool { return v.DisableApiTermination }).(pulumi.BoolOutput) 275 } 276 277 // EBS block device mappings of the Instance. 278 func (o LookupInstanceResultOutput) EbsBlockDevices() GetInstanceEbsBlockDeviceArrayOutput { 279 return o.ApplyT(func(v LookupInstanceResult) []GetInstanceEbsBlockDevice { return v.EbsBlockDevices }).(GetInstanceEbsBlockDeviceArrayOutput) 280 } 281 282 // Whether the Instance is EBS optimized or not (Boolean). 283 func (o LookupInstanceResultOutput) EbsOptimized() pulumi.BoolOutput { 284 return o.ApplyT(func(v LookupInstanceResult) bool { return v.EbsOptimized }).(pulumi.BoolOutput) 285 } 286 287 // Enclave options of the instance. 288 func (o LookupInstanceResultOutput) EnclaveOptions() GetInstanceEnclaveOptionArrayOutput { 289 return o.ApplyT(func(v LookupInstanceResult) []GetInstanceEnclaveOption { return v.EnclaveOptions }).(GetInstanceEnclaveOptionArrayOutput) 290 } 291 292 // Ephemeral block device mappings of the Instance. 293 func (o LookupInstanceResultOutput) EphemeralBlockDevices() GetInstanceEphemeralBlockDeviceArrayOutput { 294 return o.ApplyT(func(v LookupInstanceResult) []GetInstanceEphemeralBlockDevice { return v.EphemeralBlockDevices }).(GetInstanceEphemeralBlockDeviceArrayOutput) 295 } 296 297 func (o LookupInstanceResultOutput) Filters() GetInstanceFilterArrayOutput { 298 return o.ApplyT(func(v LookupInstanceResult) []GetInstanceFilter { return v.Filters }).(GetInstanceFilterArrayOutput) 299 } 300 301 func (o LookupInstanceResultOutput) GetPasswordData() pulumi.BoolPtrOutput { 302 return o.ApplyT(func(v LookupInstanceResult) *bool { return v.GetPasswordData }).(pulumi.BoolPtrOutput) 303 } 304 305 func (o LookupInstanceResultOutput) GetUserData() pulumi.BoolPtrOutput { 306 return o.ApplyT(func(v LookupInstanceResult) *bool { return v.GetUserData }).(pulumi.BoolPtrOutput) 307 } 308 309 // ID of the dedicated host the instance will be assigned to. 310 func (o LookupInstanceResultOutput) HostId() pulumi.StringOutput { 311 return o.ApplyT(func(v LookupInstanceResult) string { return v.HostId }).(pulumi.StringOutput) 312 } 313 314 // ARN of the host resource group the instance is associated with. 315 func (o LookupInstanceResultOutput) HostResourceGroupArn() pulumi.StringOutput { 316 return o.ApplyT(func(v LookupInstanceResult) string { return v.HostResourceGroupArn }).(pulumi.StringOutput) 317 } 318 319 // Name of the instance profile associated with the Instance. 320 func (o LookupInstanceResultOutput) IamInstanceProfile() pulumi.StringOutput { 321 return o.ApplyT(func(v LookupInstanceResult) string { return v.IamInstanceProfile }).(pulumi.StringOutput) 322 } 323 324 // The provider-assigned unique ID for this managed resource. 325 func (o LookupInstanceResultOutput) Id() pulumi.StringOutput { 326 return o.ApplyT(func(v LookupInstanceResult) string { return v.Id }).(pulumi.StringOutput) 327 } 328 329 func (o LookupInstanceResultOutput) InstanceId() pulumi.StringPtrOutput { 330 return o.ApplyT(func(v LookupInstanceResult) *string { return v.InstanceId }).(pulumi.StringPtrOutput) 331 } 332 333 // State of the instance. One of: `pending`, `running`, `shutting-down`, `terminated`, `stopping`, `stopped`. See [Instance Lifecycle](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) for more information. 334 func (o LookupInstanceResultOutput) InstanceState() pulumi.StringOutput { 335 return o.ApplyT(func(v LookupInstanceResult) string { return v.InstanceState }).(pulumi.StringOutput) 336 } 337 338 func (o LookupInstanceResultOutput) InstanceTags() pulumi.StringMapOutput { 339 return o.ApplyT(func(v LookupInstanceResult) map[string]string { return v.InstanceTags }).(pulumi.StringMapOutput) 340 } 341 342 // Type of the Instance. 343 func (o LookupInstanceResultOutput) InstanceType() pulumi.StringOutput { 344 return o.ApplyT(func(v LookupInstanceResult) string { return v.InstanceType }).(pulumi.StringOutput) 345 } 346 347 // IPv6 addresses associated to the Instance, if applicable. **NOTE**: Unlike the IPv4 address, this doesn't change if you attach an EIP to the instance. 348 func (o LookupInstanceResultOutput) Ipv6Addresses() pulumi.StringArrayOutput { 349 return o.ApplyT(func(v LookupInstanceResult) []string { return v.Ipv6Addresses }).(pulumi.StringArrayOutput) 350 } 351 352 // Key name of the Instance. 353 func (o LookupInstanceResultOutput) KeyName() pulumi.StringOutput { 354 return o.ApplyT(func(v LookupInstanceResult) string { return v.KeyName }).(pulumi.StringOutput) 355 } 356 357 // Maintenance and recovery options for the instance. 358 func (o LookupInstanceResultOutput) MaintenanceOptions() GetInstanceMaintenanceOptionArrayOutput { 359 return o.ApplyT(func(v LookupInstanceResult) []GetInstanceMaintenanceOption { return v.MaintenanceOptions }).(GetInstanceMaintenanceOptionArrayOutput) 360 } 361 362 // Metadata options of the Instance. 363 func (o LookupInstanceResultOutput) MetadataOptions() GetInstanceMetadataOptionArrayOutput { 364 return o.ApplyT(func(v LookupInstanceResult) []GetInstanceMetadataOption { return v.MetadataOptions }).(GetInstanceMetadataOptionArrayOutput) 365 } 366 367 // Whether detailed monitoring is enabled or disabled for the Instance (Boolean). 368 func (o LookupInstanceResultOutput) Monitoring() pulumi.BoolOutput { 369 return o.ApplyT(func(v LookupInstanceResult) bool { return v.Monitoring }).(pulumi.BoolOutput) 370 } 371 372 // ID of the network interface that was created with the Instance. 373 func (o LookupInstanceResultOutput) NetworkInterfaceId() pulumi.StringOutput { 374 return o.ApplyT(func(v LookupInstanceResult) string { return v.NetworkInterfaceId }).(pulumi.StringOutput) 375 } 376 377 // ARN of the Outpost. 378 func (o LookupInstanceResultOutput) OutpostArn() pulumi.StringOutput { 379 return o.ApplyT(func(v LookupInstanceResult) string { return v.OutpostArn }).(pulumi.StringOutput) 380 } 381 382 // Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password for instances running Microsoft Windows. This attribute is only exported if `getPasswordData` is true. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordData.html) for more information. 383 func (o LookupInstanceResultOutput) PasswordData() pulumi.StringOutput { 384 return o.ApplyT(func(v LookupInstanceResult) string { return v.PasswordData }).(pulumi.StringOutput) 385 } 386 387 // Placement group of the Instance. 388 func (o LookupInstanceResultOutput) PlacementGroup() pulumi.StringOutput { 389 return o.ApplyT(func(v LookupInstanceResult) string { return v.PlacementGroup }).(pulumi.StringOutput) 390 } 391 392 // Number of the partition the instance is in. 393 func (o LookupInstanceResultOutput) PlacementPartitionNumber() pulumi.IntOutput { 394 return o.ApplyT(func(v LookupInstanceResult) int { return v.PlacementPartitionNumber }).(pulumi.IntOutput) 395 } 396 397 // Private DNS name assigned to the Instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC. 398 func (o LookupInstanceResultOutput) PrivateDns() pulumi.StringOutput { 399 return o.ApplyT(func(v LookupInstanceResult) string { return v.PrivateDns }).(pulumi.StringOutput) 400 } 401 402 // Options for the instance hostname. 403 func (o LookupInstanceResultOutput) PrivateDnsNameOptions() GetInstancePrivateDnsNameOptionArrayOutput { 404 return o.ApplyT(func(v LookupInstanceResult) []GetInstancePrivateDnsNameOption { return v.PrivateDnsNameOptions }).(GetInstancePrivateDnsNameOptionArrayOutput) 405 } 406 407 // Private IP address assigned to the Instance. 408 func (o LookupInstanceResultOutput) PrivateIp() pulumi.StringOutput { 409 return o.ApplyT(func(v LookupInstanceResult) string { return v.PrivateIp }).(pulumi.StringOutput) 410 } 411 412 // Public DNS name assigned to the Instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC. 413 func (o LookupInstanceResultOutput) PublicDns() pulumi.StringOutput { 414 return o.ApplyT(func(v LookupInstanceResult) string { return v.PublicDns }).(pulumi.StringOutput) 415 } 416 417 // Public IP address assigned to the Instance, if applicable. **NOTE**: If you are using an `ec2.Eip` with your instance, you should refer to the EIP's address directly and not use `publicIp`, as this field will change after the EIP is attached. 418 func (o LookupInstanceResultOutput) PublicIp() pulumi.StringOutput { 419 return o.ApplyT(func(v LookupInstanceResult) string { return v.PublicIp }).(pulumi.StringOutput) 420 } 421 422 // Root block device mappings of the Instance 423 func (o LookupInstanceResultOutput) RootBlockDevices() GetInstanceRootBlockDeviceArrayOutput { 424 return o.ApplyT(func(v LookupInstanceResult) []GetInstanceRootBlockDevice { return v.RootBlockDevices }).(GetInstanceRootBlockDeviceArrayOutput) 425 } 426 427 // Secondary private IPv4 addresses assigned to the instance's primary network interface (eth0) in a VPC. 428 func (o LookupInstanceResultOutput) SecondaryPrivateIps() pulumi.StringArrayOutput { 429 return o.ApplyT(func(v LookupInstanceResult) []string { return v.SecondaryPrivateIps }).(pulumi.StringArrayOutput) 430 } 431 432 // Associated security groups. 433 func (o LookupInstanceResultOutput) SecurityGroups() pulumi.StringArrayOutput { 434 return o.ApplyT(func(v LookupInstanceResult) []string { return v.SecurityGroups }).(pulumi.StringArrayOutput) 435 } 436 437 // Whether the network interface performs source/destination checking (Boolean). 438 func (o LookupInstanceResultOutput) SourceDestCheck() pulumi.BoolOutput { 439 return o.ApplyT(func(v LookupInstanceResult) bool { return v.SourceDestCheck }).(pulumi.BoolOutput) 440 } 441 442 // VPC subnet ID. 443 func (o LookupInstanceResultOutput) SubnetId() pulumi.StringOutput { 444 return o.ApplyT(func(v LookupInstanceResult) string { return v.SubnetId }).(pulumi.StringOutput) 445 } 446 447 // Map of tags assigned to the Instance. 448 func (o LookupInstanceResultOutput) Tags() pulumi.StringMapOutput { 449 return o.ApplyT(func(v LookupInstanceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 450 } 451 452 // Tenancy of the instance: `dedicated`, `default`, `host`. 453 func (o LookupInstanceResultOutput) Tenancy() pulumi.StringOutput { 454 return o.ApplyT(func(v LookupInstanceResult) string { return v.Tenancy }).(pulumi.StringOutput) 455 } 456 457 // SHA-1 hash of User Data supplied to the Instance. 458 func (o LookupInstanceResultOutput) UserData() pulumi.StringOutput { 459 return o.ApplyT(func(v LookupInstanceResult) string { return v.UserData }).(pulumi.StringOutput) 460 } 461 462 // Base64 encoded contents of User Data supplied to the Instance. This attribute is only exported if `getUserData` is true. 463 func (o LookupInstanceResultOutput) UserDataBase64() pulumi.StringOutput { 464 return o.ApplyT(func(v LookupInstanceResult) string { return v.UserDataBase64 }).(pulumi.StringOutput) 465 } 466 467 // Associated security groups in a non-default VPC. 468 func (o LookupInstanceResultOutput) VpcSecurityGroupIds() pulumi.StringArrayOutput { 469 return o.ApplyT(func(v LookupInstanceResult) []string { return v.VpcSecurityGroupIds }).(pulumi.StringArrayOutput) 470 } 471 472 func init() { 473 pulumi.RegisterOutputType(LookupInstanceResultOutput{}) 474 }