Last active
August 9, 2023 15:18
-
-
Save jaxxstorm/d6ef8d94acaf9f0c702c92a4f84c3c8b to your computer and use it in GitHub Desktop.
StackInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import infrastructure_lib.stackinfo as stackinfo | |
STACK = pulumi.get_stack() | |
vpc = stackinfo.VpcStackInfo(STACK) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VpcStackInfo(pulumi.StackReference): | |
vpc_id = pulumi.Output[Any] | |
private_subnet_ids = pulumi.Output[Any] | |
public_subnet_ids = pulumi.Output[Any] | |
cidr_block = pulumi.Output[Any] | |
def __init__(self, stack_name: str): | |
super().__init__(f"orgname/vpc/{stack_name}") | |
self.vpc_id = self.require_output("vpc_id") # type: ignore | |
self.private_subnet_ids = self.require_output("private_subnet_ids") # type: ignore | |
self.public_subnet_ids = self.require_output("public_subnet_ids") # type: ignore | |
self.cidr_block = self.require_output("cidr_block") # type: ignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment