streamtime_network (Resource)
A cloud network (VPC or VCN) for fleets. Leave network_id out and Streamtime creates the network in the cloud account; set it to use a network you already have.
Example Usage
# Streamtime creates the VPC in the cloud account and fills in network_id.
resource "streamtime_network" "prod" {
identifier = "prod-vpc"
name = "prod-vpc"
cloud_account = streamtime_cloud_account.aws.identifier
region = "eu-west-1"
cidr = "10.20.0.0/16"
}
# Or use a VPC you already have: set network_id and nothing is created.
resource "streamtime_network" "existing" {
identifier = "shared-vpc"
name = "shared-vpc"
cloud_account = streamtime_cloud_account.aws.identifier
network_id = "vpc-0123456789abcdef0"
}
Schema
Required
cloud_account(String) Identifier of the cloud account the network belongs to. Changing it creates a new network.identifier(String) Unique name of the network in Streamtime. Changing it creates a new network.name(String) Display name, also used for a network Streamtime creates.
Optional
cidr(String) Address range, for example 10.0.0.0/16. Leave it out to use the cloud’s default. Changing it creates a new network.network_id(String) The cloud’s ID of the network. Set it to use an existing network; leave it out and Streamtime creates one and fills this in. Changing a configured value creates a new network.region(String) Cloud region. Required when Streamtime creates the network. Changing it creates a new network.timeouts(Attributes) (see below for nested schema)
Read-Only
id(String) Same as identifier. Use the identifier to import.provisioned_by_streamtime(Boolean) Whether Streamtime created the cloud network. Unknown after an import.
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import by identifier.
terraform import streamtime_network.prod prod-vpc