sparse-intern-71089
08/26/2020, 7:34 PMgentle-diamond-70147
08/26/2020, 8:20 PMbitter-application-91815
08/26/2020, 8:21 PMbitter-application-91815
08/26/2020, 8:22 PMgentle-diamond-70147
08/26/2020, 8:24 PMeks.NewCluster
?bitter-application-91815
08/26/2020, 8:25 PMbitter-application-91815
08/26/2020, 8:25 PMbitter-application-91815
08/26/2020, 8:25 PMbitter-application-91815
08/26/2020, 8:25 PMgentle-diamond-70147
08/26/2020, 9:02 PMLookupVpc
to query for the default VPC details. The LookupVpc documentation is here - https://www.pulumi.com/docs/reference/pkg/aws/ec2/getvpc/#using.
And here's an example - https://github.com/pulumi/examples/blob/fd422a115ca1602eed9a895ab4ed748185d798cc/aws-go-eks/main.go#L18-L23.bitter-application-91815
08/26/2020, 9:32 PMbitter-application-91815
08/26/2020, 9:32 PMbitter-application-91815
08/26/2020, 9:44 PMbitter-application-91815
08/26/2020, 9:52 PM// GetVpc gets an existing Vpc resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetVpc(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VpcState, opts ...pulumi.ResourceOption) (*Vpc, error) {
var resource Vpc
err := ctx.ReadResource("aws:ec2/vpc:Vpc", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
bitter-application-91815
08/26/2020, 9:53 PMgentle-diamond-70147
08/26/2020, 10:55 PMMakes sense, if i was to create a vpc (which i probably should do per env) which of the returned properties correspond to the string db subnet group from hereYou would need to create a SubnetGroup as well and provide that to the Cluster and ClusterInstance resources - https://www.pulumi.com/docs/reference/pkg/aws/rds/subnetgroup/.
gentle-diamond-70147
08/26/2020, 10:58 PMWhere should I find the id from, I'll know the name beforehand (since i provide it on creation) but not the idIf you are creating the resource in your Pulumi application, then you would use
.ID()
off the resource that you created.gentle-diamond-70147
08/26/2020, 10:59 PMsiteBucket.ID()
in the example at https://github.com/pulumi/examples/blob/fd422a115ca1602eed9a895ab4ed748185d798cc/aws-go-s3-folder/main.go#L45.bitter-application-91815
08/28/2020, 1:21 PM