acceptable-plumber-31485
03/15/2023, 1:33 PM.get
api/method from https://www.pulumi.com/registry/packages/aws/api-docs/ec2/securitygroup/ What is provider id? I'm currently on EC2 security group console specifically on the existing sg but I can't figure out what provider is.calm-cat-43230
03/15/2023, 2:14 PMacceptable-plumber-31485
03/15/2023, 2:15 PMcalm-cat-43230
03/15/2023, 2:28 PMec2
resource method; not immediately intuitive, but appears to be a common pattern for AWS constructions in Pulumi.acceptable-plumber-31485
03/15/2023, 2:29 PM# Retrieve the security group object by name
existing_security_group = aws.ec2.SecurityGroup.get(
resource_name=existing_security_group_name,
id="sg-aaaaaaaaaaaaaaa",
tags={"name": existing_security_group_name},
)
my_sg.id
my_sg = aws.ec2.get_security_groups(tags={
"name": "myhttp-sg",
})
instance = aws.ec2.Instance(
resource_name="my-instance",
instance_type="t2.micro",
ami="ami-1111111111111",
vpc_security_group_ids=[my_sg.id],
tags=tags
)
and error
error: 1 error occurred:
* creating EC2 Instance: InvalidParameterValue: Value () for parameter groupId is invalid. The value cannot be empty
status code: 400, request id: 9f7a42d7-f64b-376a-8e10-bde2445d4770
calm-cat-43230
03/15/2023, 3:51 PMacceptable-plumber-31485
03/15/2023, 4:00 PMstocky-restaurant-98004
03/15/2023, 6:51 PMimport
, so just check the Import section of the docs.
In the meanwhile, if you could also upvote and/or comment on this issue, it would be helpful in prioritizing a fix: https://github.com/pulumi/pulumi/issues/11737