hcp.AwsTransitGatewayAttachment
Explore with Pulumi AI
Import
The import ID is {hvn_id}:{transit_gateway_attachment_id}
$ pulumi import hcp:index/awsTransitGatewayAttachment:AwsTransitGatewayAttachment example main-hvn:example-tgw-attachment
Example Usage
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;
using Hcp = Pulumi.Hcp;
return await Deployment.RunAsync(() =>
{
var main = new Hcp.Hvn("main", new()
{
HvnId = "main-hvn",
CloudProvider = "aws",
Region = "us-west-2",
CidrBlock = "172.25.16.0/20",
});
var exampleVpc = new Aws.Ec2.Vpc("exampleVpc", new()
{
CidrBlock = "172.31.0.0/16",
});
var exampleTransitGateway = new Aws.Ec2TransitGateway.TransitGateway("exampleTransitGateway", new()
{
Tags =
{
{ "Name", "example-tgw" },
},
});
var exampleResourceShare = new Aws.Ram.ResourceShare("exampleResourceShare", new()
{
AllowExternalPrincipals = true,
});
var examplePrincipalAssociation = new Aws.Ram.PrincipalAssociation("examplePrincipalAssociation", new()
{
ResourceShareArn = exampleResourceShare.Arn,
Principal = main.ProviderAccountId,
});
var exampleResourceAssociation = new Aws.Ram.ResourceAssociation("exampleResourceAssociation", new()
{
ResourceShareArn = exampleResourceShare.Arn,
ResourceArn = exampleTransitGateway.Arn,
});
var exampleAwsTransitGatewayAttachment = new Hcp.AwsTransitGatewayAttachment("exampleAwsTransitGatewayAttachment", new()
{
HvnId = main.HvnId,
TransitGatewayAttachmentId = "example-tgw-attachment",
TransitGatewayId = exampleTransitGateway.Id,
ResourceShareArn = exampleResourceShare.Arn,
}, new CustomResourceOptions
{
DependsOn = new[]
{
examplePrincipalAssociation,
exampleResourceAssociation,
},
});
var route = new Hcp.HvnRoute("route", new()
{
HvnLink = main.SelfLink,
HvnRouteId = "hvn-to-tgw-attachment",
DestinationCidr = exampleVpc.CidrBlock,
TargetLink = exampleAwsTransitGatewayAttachment.SelfLink,
});
var exampleVpcAttachmentAccepter = new Aws.Ec2TransitGateway.VpcAttachmentAccepter("exampleVpcAttachmentAccepter", new()
{
TransitGatewayAttachmentId = exampleAwsTransitGatewayAttachment.ProviderTransitGatewayAttachmentId,
});
});
package main
import (
"github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ram"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
main, err := hcp.NewHvn(ctx, "main", &hcp.HvnArgs{
HvnId: pulumi.String("main-hvn"),
CloudProvider: pulumi.String("aws"),
Region: pulumi.String("us-west-2"),
CidrBlock: pulumi.String("172.25.16.0/20"),
})
if err != nil {
return err
}
exampleVpc, err := ec2.NewVpc(ctx, "exampleVpc", &ec2.VpcArgs{
CidrBlock: pulumi.String("172.31.0.0/16"),
})
if err != nil {
return err
}
exampleTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, "exampleTransitGateway", &ec2transitgateway.TransitGatewayArgs{
Tags: pulumi.StringMap{
"Name": pulumi.String("example-tgw"),
},
})
if err != nil {
return err
}
exampleResourceShare, err := ram.NewResourceShare(ctx, "exampleResourceShare", &ram.ResourceShareArgs{
AllowExternalPrincipals: pulumi.Bool(true),
})
if err != nil {
return err
}
examplePrincipalAssociation, err := ram.NewPrincipalAssociation(ctx, "examplePrincipalAssociation", &ram.PrincipalAssociationArgs{
ResourceShareArn: exampleResourceShare.Arn,
Principal: main.ProviderAccountId,
})
if err != nil {
return err
}
exampleResourceAssociation, err := ram.NewResourceAssociation(ctx, "exampleResourceAssociation", &ram.ResourceAssociationArgs{
ResourceShareArn: exampleResourceShare.Arn,
ResourceArn: exampleTransitGateway.Arn,
})
if err != nil {
return err
}
exampleAwsTransitGatewayAttachment, err := hcp.NewAwsTransitGatewayAttachment(ctx, "exampleAwsTransitGatewayAttachment", &hcp.AwsTransitGatewayAttachmentArgs{
HvnId: main.HvnId,
TransitGatewayAttachmentId: pulumi.String("example-tgw-attachment"),
TransitGatewayId: exampleTransitGateway.ID(),
ResourceShareArn: exampleResourceShare.Arn,
}, pulumi.DependsOn([]pulumi.Resource{
examplePrincipalAssociation,
exampleResourceAssociation,
}))
if err != nil {
return err
}
_, err = hcp.NewHvnRoute(ctx, "route", &hcp.HvnRouteArgs{
HvnLink: main.SelfLink,
HvnRouteId: pulumi.String("hvn-to-tgw-attachment"),
DestinationCidr: exampleVpc.CidrBlock,
TargetLink: exampleAwsTransitGatewayAttachment.SelfLink,
})
if err != nil {
return err
}
_, err = ec2transitgateway.NewVpcAttachmentAccepter(ctx, "exampleVpcAttachmentAccepter", &ec2transitgateway.VpcAttachmentAccepterArgs{
TransitGatewayAttachmentId: exampleAwsTransitGatewayAttachment.ProviderTransitGatewayAttachmentId,
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcp.Hvn;
import com.pulumi.hcp.HvnArgs;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2transitgateway.TransitGateway;
import com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;
import com.pulumi.aws.ram.ResourceShare;
import com.pulumi.aws.ram.ResourceShareArgs;
import com.pulumi.aws.ram.PrincipalAssociation;
import com.pulumi.aws.ram.PrincipalAssociationArgs;
import com.pulumi.aws.ram.ResourceAssociation;
import com.pulumi.aws.ram.ResourceAssociationArgs;
import com.pulumi.hcp.AwsTransitGatewayAttachment;
import com.pulumi.hcp.AwsTransitGatewayAttachmentArgs;
import com.pulumi.hcp.HvnRoute;
import com.pulumi.hcp.HvnRouteArgs;
import com.pulumi.aws.ec2transitgateway.VpcAttachmentAccepter;
import com.pulumi.aws.ec2transitgateway.VpcAttachmentAccepterArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var main = new Hvn("main", HvnArgs.builder()
.hvnId("main-hvn")
.cloudProvider("aws")
.region("us-west-2")
.cidrBlock("172.25.16.0/20")
.build());
var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
.cidrBlock("172.31.0.0/16")
.build());
var exampleTransitGateway = new TransitGateway("exampleTransitGateway", TransitGatewayArgs.builder()
.tags(Map.of("Name", "example-tgw"))
.build());
var exampleResourceShare = new ResourceShare("exampleResourceShare", ResourceShareArgs.builder()
.allowExternalPrincipals(true)
.build());
var examplePrincipalAssociation = new PrincipalAssociation("examplePrincipalAssociation", PrincipalAssociationArgs.builder()
.resourceShareArn(exampleResourceShare.arn())
.principal(main.providerAccountId())
.build());
var exampleResourceAssociation = new ResourceAssociation("exampleResourceAssociation", ResourceAssociationArgs.builder()
.resourceShareArn(exampleResourceShare.arn())
.resourceArn(exampleTransitGateway.arn())
.build());
var exampleAwsTransitGatewayAttachment = new AwsTransitGatewayAttachment("exampleAwsTransitGatewayAttachment", AwsTransitGatewayAttachmentArgs.builder()
.hvnId(main.hvnId())
.transitGatewayAttachmentId("example-tgw-attachment")
.transitGatewayId(exampleTransitGateway.id())
.resourceShareArn(exampleResourceShare.arn())
.build(), CustomResourceOptions.builder()
.dependsOn(
examplePrincipalAssociation,
exampleResourceAssociation)
.build());
var route = new HvnRoute("route", HvnRouteArgs.builder()
.hvnLink(main.selfLink())
.hvnRouteId("hvn-to-tgw-attachment")
.destinationCidr(exampleVpc.cidrBlock())
.targetLink(exampleAwsTransitGatewayAttachment.selfLink())
.build());
var exampleVpcAttachmentAccepter = new VpcAttachmentAccepter("exampleVpcAttachmentAccepter", VpcAttachmentAccepterArgs.builder()
.transitGatewayAttachmentId(exampleAwsTransitGatewayAttachment.providerTransitGatewayAttachmentId())
.build());
}
}
import pulumi
import pulumi_aws as aws
import pulumi_hcp as hcp
main = hcp.Hvn("main",
hvn_id="main-hvn",
cloud_provider="aws",
region="us-west-2",
cidr_block="172.25.16.0/20")
example_vpc = aws.ec2.Vpc("exampleVpc", cidr_block="172.31.0.0/16")
example_transit_gateway = aws.ec2transitgateway.TransitGateway("exampleTransitGateway", tags={
"Name": "example-tgw",
})
example_resource_share = aws.ram.ResourceShare("exampleResourceShare", allow_external_principals=True)
example_principal_association = aws.ram.PrincipalAssociation("examplePrincipalAssociation",
resource_share_arn=example_resource_share.arn,
principal=main.provider_account_id)
example_resource_association = aws.ram.ResourceAssociation("exampleResourceAssociation",
resource_share_arn=example_resource_share.arn,
resource_arn=example_transit_gateway.arn)
example_aws_transit_gateway_attachment = hcp.AwsTransitGatewayAttachment("exampleAwsTransitGatewayAttachment",
hvn_id=main.hvn_id,
transit_gateway_attachment_id="example-tgw-attachment",
transit_gateway_id=example_transit_gateway.id,
resource_share_arn=example_resource_share.arn,
opts=pulumi.ResourceOptions(depends_on=[
example_principal_association,
example_resource_association,
]))
route = hcp.HvnRoute("route",
hvn_link=main.self_link,
hvn_route_id="hvn-to-tgw-attachment",
destination_cidr=example_vpc.cidr_block,
target_link=example_aws_transit_gateway_attachment.self_link)
example_vpc_attachment_accepter = aws.ec2transitgateway.VpcAttachmentAccepter("exampleVpcAttachmentAccepter", transit_gateway_attachment_id=example_aws_transit_gateway_attachment.provider_transit_gateway_attachment_id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as hcp from "@grapl/pulumi-hcp";
const main = new hcp.Hvn("main", {
hvnId: "main-hvn",
cloudProvider: "aws",
region: "us-west-2",
cidrBlock: "172.25.16.0/20",
});
const exampleVpc = new aws.ec2.Vpc("exampleVpc", {cidrBlock: "172.31.0.0/16"});
const exampleTransitGateway = new aws.ec2transitgateway.TransitGateway("exampleTransitGateway", {tags: {
Name: "example-tgw",
}});
const exampleResourceShare = new aws.ram.ResourceShare("exampleResourceShare", {allowExternalPrincipals: true});
const examplePrincipalAssociation = new aws.ram.PrincipalAssociation("examplePrincipalAssociation", {
resourceShareArn: exampleResourceShare.arn,
principal: main.providerAccountId,
});
const exampleResourceAssociation = new aws.ram.ResourceAssociation("exampleResourceAssociation", {
resourceShareArn: exampleResourceShare.arn,
resourceArn: exampleTransitGateway.arn,
});
const exampleAwsTransitGatewayAttachment = new hcp.AwsTransitGatewayAttachment("exampleAwsTransitGatewayAttachment", {
hvnId: main.hvnId,
transitGatewayAttachmentId: "example-tgw-attachment",
transitGatewayId: exampleTransitGateway.id,
resourceShareArn: exampleResourceShare.arn,
}, {
dependsOn: [
examplePrincipalAssociation,
exampleResourceAssociation,
],
});
const route = new hcp.HvnRoute("route", {
hvnLink: main.selfLink,
hvnRouteId: "hvn-to-tgw-attachment",
destinationCidr: exampleVpc.cidrBlock,
targetLink: exampleAwsTransitGatewayAttachment.selfLink,
});
const exampleVpcAttachmentAccepter = new aws.ec2transitgateway.VpcAttachmentAccepter("exampleVpcAttachmentAccepter", {transitGatewayAttachmentId: exampleAwsTransitGatewayAttachment.providerTransitGatewayAttachmentId});
resources:
main:
type: hcp:Hvn
properties:
hvnId: main-hvn
cloudProvider: aws
region: us-west-2
cidrBlock: 172.25.16.0/20
exampleVpc:
type: aws:ec2:Vpc
properties:
cidrBlock: 172.31.0.0/16
exampleTransitGateway:
type: aws:ec2transitgateway:TransitGateway
properties:
tags:
Name: example-tgw
exampleResourceShare:
type: aws:ram:ResourceShare
properties:
allowExternalPrincipals: true
examplePrincipalAssociation:
type: aws:ram:PrincipalAssociation
properties:
resourceShareArn: ${exampleResourceShare.arn}
principal: ${main.providerAccountId}
exampleResourceAssociation:
type: aws:ram:ResourceAssociation
properties:
resourceShareArn: ${exampleResourceShare.arn}
resourceArn: ${exampleTransitGateway.arn}
exampleAwsTransitGatewayAttachment:
type: hcp:AwsTransitGatewayAttachment
properties:
hvnId: ${main.hvnId}
transitGatewayAttachmentId: example-tgw-attachment
transitGatewayId: ${exampleTransitGateway.id}
resourceShareArn: ${exampleResourceShare.arn}
options:
dependson:
- ${examplePrincipalAssociation}
- ${exampleResourceAssociation}
route:
type: hcp:HvnRoute
properties:
hvnLink: ${main.selfLink}
hvnRouteId: hvn-to-tgw-attachment
destinationCidr: ${exampleVpc.cidrBlock}
targetLink: ${exampleAwsTransitGatewayAttachment.selfLink}
exampleVpcAttachmentAccepter:
type: aws:ec2transitgateway:VpcAttachmentAccepter
properties:
transitGatewayAttachmentId: ${exampleAwsTransitGatewayAttachment.providerTransitGatewayAttachmentId}
Create AwsTransitGatewayAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AwsTransitGatewayAttachment(name: string, args: AwsTransitGatewayAttachmentArgs, opts?: CustomResourceOptions);
@overload
def AwsTransitGatewayAttachment(resource_name: str,
args: AwsTransitGatewayAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AwsTransitGatewayAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
hvn_id: Optional[str] = None,
resource_share_arn: Optional[str] = None,
transit_gateway_attachment_id: Optional[str] = None,
transit_gateway_id: Optional[str] = None)
func NewAwsTransitGatewayAttachment(ctx *Context, name string, args AwsTransitGatewayAttachmentArgs, opts ...ResourceOption) (*AwsTransitGatewayAttachment, error)
public AwsTransitGatewayAttachment(string name, AwsTransitGatewayAttachmentArgs args, CustomResourceOptions? opts = null)
public AwsTransitGatewayAttachment(String name, AwsTransitGatewayAttachmentArgs args)
public AwsTransitGatewayAttachment(String name, AwsTransitGatewayAttachmentArgs args, CustomResourceOptions options)
type: hcp:AwsTransitGatewayAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AwsTransitGatewayAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AwsTransitGatewayAttachmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AwsTransitGatewayAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AwsTransitGatewayAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AwsTransitGatewayAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsTransitGatewayAttachmentResource = new Hcp.AwsTransitGatewayAttachment("awsTransitGatewayAttachmentResource", new()
{
HvnId = "string",
ResourceShareArn = "string",
TransitGatewayAttachmentId = "string",
TransitGatewayId = "string",
});
example, err := hcp.NewAwsTransitGatewayAttachment(ctx, "awsTransitGatewayAttachmentResource", &hcp.AwsTransitGatewayAttachmentArgs{
HvnId: pulumi.String("string"),
ResourceShareArn: pulumi.String("string"),
TransitGatewayAttachmentId: pulumi.String("string"),
TransitGatewayId: pulumi.String("string"),
})
var awsTransitGatewayAttachmentResource = new AwsTransitGatewayAttachment("awsTransitGatewayAttachmentResource", AwsTransitGatewayAttachmentArgs.builder()
.hvnId("string")
.resourceShareArn("string")
.transitGatewayAttachmentId("string")
.transitGatewayId("string")
.build());
aws_transit_gateway_attachment_resource = hcp.AwsTransitGatewayAttachment("awsTransitGatewayAttachmentResource",
hvn_id="string",
resource_share_arn="string",
transit_gateway_attachment_id="string",
transit_gateway_id="string")
const awsTransitGatewayAttachmentResource = new hcp.AwsTransitGatewayAttachment("awsTransitGatewayAttachmentResource", {
hvnId: "string",
resourceShareArn: "string",
transitGatewayAttachmentId: "string",
transitGatewayId: "string",
});
type: hcp:AwsTransitGatewayAttachment
properties:
hvnId: string
resourceShareArn: string
transitGatewayAttachmentId: string
transitGatewayId: string
AwsTransitGatewayAttachment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AwsTransitGatewayAttachment resource accepts the following input properties:
- Hvn
Id string - The ID of the HashiCorp Virtual Network (HVN).
- string
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- Transit
Gateway stringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- Transit
Gateway stringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- Hvn
Id string - The ID of the HashiCorp Virtual Network (HVN).
- string
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- Transit
Gateway stringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- Transit
Gateway stringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- hvn
Id String - The ID of the HashiCorp Virtual Network (HVN).
- String
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- transit
Gateway StringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- transit
Gateway StringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- hvn
Id string - The ID of the HashiCorp Virtual Network (HVN).
- string
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- transit
Gateway stringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- transit
Gateway stringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- hvn_
id str - The ID of the HashiCorp Virtual Network (HVN).
- str
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- transit_
gateway_ strattachment_ id - The user-settable name of the transit gateway attachment in HCP.
- transit_
gateway_ strid - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- hvn
Id String - The ID of the HashiCorp Virtual Network (HVN).
- String
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- transit
Gateway StringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- transit
Gateway StringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
Outputs
All input properties are implicitly available as output properties. Additionally, the AwsTransitGatewayAttachment resource produces the following output properties:
- Created
At string - The time that the transit gateway attachment was created.
- Expires
At string - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - Id string
- The provider-assigned unique ID for this managed resource.
- Organization
Id string - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- Project
Id string - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- Provider
Transit stringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- Self
Link string - A unique URL identifying the transit gateway attachment.
- State string
- The state of the transit gateway attachment.
- Created
At string - The time that the transit gateway attachment was created.
- Expires
At string - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - Id string
- The provider-assigned unique ID for this managed resource.
- Organization
Id string - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- Project
Id string - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- Provider
Transit stringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- Self
Link string - A unique URL identifying the transit gateway attachment.
- State string
- The state of the transit gateway attachment.
- created
At String - The time that the transit gateway attachment was created.
- expires
At String - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - id String
- The provider-assigned unique ID for this managed resource.
- organization
Id String - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- project
Id String - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- provider
Transit StringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- self
Link String - A unique URL identifying the transit gateway attachment.
- state String
- The state of the transit gateway attachment.
- created
At string - The time that the transit gateway attachment was created.
- expires
At string - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - id string
- The provider-assigned unique ID for this managed resource.
- organization
Id string - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- project
Id string - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- provider
Transit stringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- self
Link string - A unique URL identifying the transit gateway attachment.
- state string
- The state of the transit gateway attachment.
- created_
at str - The time that the transit gateway attachment was created.
- expires_
at str - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - id str
- The provider-assigned unique ID for this managed resource.
- organization_
id str - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- project_
id str - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- provider_
transit_ strgateway_ attachment_ id - The transit gateway attachment ID used by AWS.
- self_
link str - A unique URL identifying the transit gateway attachment.
- state str
- The state of the transit gateway attachment.
- created
At String - The time that the transit gateway attachment was created.
- expires
At String - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - id String
- The provider-assigned unique ID for this managed resource.
- organization
Id String - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- project
Id String - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- provider
Transit StringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- self
Link String - A unique URL identifying the transit gateway attachment.
- state String
- The state of the transit gateway attachment.
Look up Existing AwsTransitGatewayAttachment Resource
Get an existing AwsTransitGatewayAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AwsTransitGatewayAttachmentState, opts?: CustomResourceOptions): AwsTransitGatewayAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
expires_at: Optional[str] = None,
hvn_id: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
provider_transit_gateway_attachment_id: Optional[str] = None,
resource_share_arn: Optional[str] = None,
self_link: Optional[str] = None,
state: Optional[str] = None,
transit_gateway_attachment_id: Optional[str] = None,
transit_gateway_id: Optional[str] = None) -> AwsTransitGatewayAttachment
func GetAwsTransitGatewayAttachment(ctx *Context, name string, id IDInput, state *AwsTransitGatewayAttachmentState, opts ...ResourceOption) (*AwsTransitGatewayAttachment, error)
public static AwsTransitGatewayAttachment Get(string name, Input<string> id, AwsTransitGatewayAttachmentState? state, CustomResourceOptions? opts = null)
public static AwsTransitGatewayAttachment get(String name, Output<String> id, AwsTransitGatewayAttachmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - The time that the transit gateway attachment was created.
- Expires
At string - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - Hvn
Id string - The ID of the HashiCorp Virtual Network (HVN).
- Organization
Id string - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- Project
Id string - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- Provider
Transit stringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- string
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- Self
Link string - A unique URL identifying the transit gateway attachment.
- State string
- The state of the transit gateway attachment.
- Transit
Gateway stringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- Transit
Gateway stringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- Created
At string - The time that the transit gateway attachment was created.
- Expires
At string - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - Hvn
Id string - The ID of the HashiCorp Virtual Network (HVN).
- Organization
Id string - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- Project
Id string - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- Provider
Transit stringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- string
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- Self
Link string - A unique URL identifying the transit gateway attachment.
- State string
- The state of the transit gateway attachment.
- Transit
Gateway stringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- Transit
Gateway stringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- created
At String - The time that the transit gateway attachment was created.
- expires
At String - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - hvn
Id String - The ID of the HashiCorp Virtual Network (HVN).
- organization
Id String - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- project
Id String - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- provider
Transit StringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- String
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- self
Link String - A unique URL identifying the transit gateway attachment.
- state String
- The state of the transit gateway attachment.
- transit
Gateway StringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- transit
Gateway StringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- created
At string - The time that the transit gateway attachment was created.
- expires
At string - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - hvn
Id string - The ID of the HashiCorp Virtual Network (HVN).
- organization
Id string - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- project
Id string - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- provider
Transit stringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- string
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- self
Link string - A unique URL identifying the transit gateway attachment.
- state string
- The state of the transit gateway attachment.
- transit
Gateway stringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- transit
Gateway stringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- created_
at str - The time that the transit gateway attachment was created.
- expires_
at str - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - hvn_
id str - The ID of the HashiCorp Virtual Network (HVN).
- organization_
id str - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- project_
id str - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- provider_
transit_ strgateway_ attachment_ id - The transit gateway attachment ID used by AWS.
- str
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- self_
link str - A unique URL identifying the transit gateway attachment.
- state str
- The state of the transit gateway attachment.
- transit_
gateway_ strattachment_ id - The user-settable name of the transit gateway attachment in HCP.
- transit_
gateway_ strid - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
- created
At String - The time that the transit gateway attachment was created.
- expires
At String - The time after which the transit gateway attachment will be considered expired if it hasn't transitioned into
ACCEPTED
orACTIVE
state. - hvn
Id String - The ID of the HashiCorp Virtual Network (HVN).
- organization
Id String - The ID of the HCP organization where the transit gateway attachment is located. Always matches the HVN's organization.
- project
Id String - The ID of the HCP project where the transit gateway attachment is located. Always matches the HVN's project.
- provider
Transit StringGateway Attachment Id - The transit gateway attachment ID used by AWS.
- String
- The Amazon Resource Name (ARN) of the Resource Share that is needed to grant HCP access to the transit gateway in AWS. The Resource Share should be associated with the HCP AWS account principal (see aws_ram_principal_association) and the transit gateway resource (see aws_ram_resource_association)
- self
Link String - A unique URL identifying the transit gateway attachment.
- state String
- The state of the transit gateway attachment.
- transit
Gateway StringAttachment Id - The user-settable name of the transit gateway attachment in HCP.
- transit
Gateway StringId - The ID of the user-owned transit gateway in AWS. The AWS region of the transit gateway must match the HVN.
Package Details
- Repository
- hcp grapl-security/pulumi-hcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcp
Terraform Provider.