steep-lamp-20408
08/25/2022, 3:04 PMechoing-dinner-19531
08/25/2022, 3:08 PMsteep-lamp-20408
08/25/2022, 3:09 PMechoing-dinner-19531
08/25/2022, 3:10 PMlimited-rainbow-51650
08/25/2022, 3:25 PMget
function on any Resource class (which needs the id as @echoing-dinner-19531 described) and similar functions you see on the package level. In your case, you are more interested in aws.ec2.getInstance(…)
where you can pass a filter description.
https://www.pulumi.com/registry/packages/aws/api-docs/ec2/getinstance/steep-lamp-20408
08/25/2022, 3:44 PM.getInstance(...)
for AWS DataSources and DynamoDB tables Pulumi types. Right?limited-rainbow-51650
08/25/2022, 4:07 PMinstance
in getInstance
refers to an EC2 instance. This isn’t a function that returns you an instance of any resource type. E.g. for DynamoDB tables, you have a similar function in the aws.dynamodb
module:
https://www.pulumi.com/registry/packages/aws/api-docs/dynamodb/gettable/
There seems to be more than one AWS product which has a type DataSource
. Which product are you using in this case?steep-lamp-20408
08/26/2022, 12:55 AMDataSource
sorry I mean an AppSync DataSource, if that makes things more clear..get(...)
function but it seems it requires an ID: https://www.pulumi.com/registry/packages/aws/api-docs/appsync/datasource/import pulumi_aws as aws
dynamodb_table_info: aws.dynamodb.get_table.AwaitableGetTableResult = aws.dynamodb.get_table(name="my-name")
dynamodb_table: aws.dynamodb.Table = aws.dynamodb.Table.get(resource_name=dynamodb_table_info.name, id=dynamodb_table_info.id)