pulumi / registry

The global index of everything you can do with Pulumi.
https://www.pulumi.com/registry
Apache License 2.0
27 stars 122 forks source link

Code Sample Clarity for aws.ec2.getSubnet #5635

Open jdh313 opened 2 weeks ago

jdh313 commented 2 weeks ago

In the following code block:

import pulumi
import pulumi_aws as aws

config = pulumi.Config()
subnet_id = config.require_object("subnetId")
selected = aws.ec2.get_subnet(id=subnet_id)
subnet = aws.ec2.SecurityGroup("subnet",
    vpc_id=selected.vpc_id,
    ingress=[{
        "cidr_blocks": [selected.cidr_block],
        "from_port": 80,
        "to_port": 80,
        "protocol": "tcp",
    }])

the variable name subnet is extremely confusing as it's a security group being created with that function call.

File: themes/default/content//registry/packages/aws/api-docs/ec2/getsubnet

thoward commented 5 days ago

Thanks for reporting this issue! I completely agree with you here. I went ahead and filed a PR to make that change. Will circle back when it is merged.

Fixed in: https://github.com/hashicorp/terraform-provider-aws/pull/39781