published on Thursday, May 7, 2026 by rootlyhq
published on Thursday, May 7, 2026 by rootlyhq
Example Usage
resource "rootly_environment" "development" {
name = "development"
color = "#FF0000"
notify_emails = ["foo@acme.com", "bar@acme.com"]
slack_aliases {
id = "S0614TZR7"
name = "Alias 1" // Any string really
}
slack_channels {
id = "C06A4RZR9"
name = "Channel 1" // Any string really
}
slack_channels {
id = "C02T4RYR2"
name = "Channel 2" // Any string really
}
}
resource "rootly_environment" "staging" {
name = "staging"
color = "#FFA500"
notify_emails = ["foo@acme.com", "bar@acme.com"]
slack_aliases {
id = "S0614TZR7"
name = "Alias 1" // Any string really
}
slack_channels {
id = "C06A4RZR9"
name = "Channel 1" // Any string really
}
slack_channels {
id = "C02T4RYR2"
name = "Channel 2" // Any string really
}
}
resource "rootly_environment" "production" {
name = "production"
color = "#FFA500"
notify_emails = ["foo@acme.com", "bar@acme.com"]
slack_aliases {
id = "S0614TZR7"
name = "Alias 1" // Any string really
}
slack_channels {
id = "C06A4RZR9"
name = "Channel 1" // Any string really
}
slack_channels {
id = "C02T4RYR2"
name = "Channel 2" // Any string really
}
}
Create Environment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Environment(name: string, args?: EnvironmentArgs, opts?: CustomResourceOptions);@overload
def Environment(resource_name: str,
args: Optional[EnvironmentArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Environment(resource_name: str,
opts: Optional[ResourceOptions] = None,
color: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
notify_emails: Optional[Sequence[str]] = None,
position: Optional[int] = None,
properties: Optional[Sequence[EnvironmentPropertyArgs]] = None,
slack_aliases: Optional[Sequence[EnvironmentSlackAliasArgs]] = None,
slack_channels: Optional[Sequence[EnvironmentSlackChannelArgs]] = None,
slug: Optional[str] = None)func NewEnvironment(ctx *Context, name string, args *EnvironmentArgs, opts ...ResourceOption) (*Environment, error)public Environment(string name, EnvironmentArgs? args = null, CustomResourceOptions? opts = null)
public Environment(String name, EnvironmentArgs args)
public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
type: rootly:Environment
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 EnvironmentArgs
- 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 EnvironmentArgs
- 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 EnvironmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnvironmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnvironmentArgs
- 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 environmentResource = new Rootly.Environment("environmentResource", new()
{
Color = "string",
Description = "string",
Name = "string",
NotifyEmails = new[]
{
"string",
},
Position = 0,
Properties = new[]
{
new Rootly.Inputs.EnvironmentPropertyArgs
{
CatalogPropertyId = "string",
Value = "string",
},
},
SlackAliases = new[]
{
new Rootly.Inputs.EnvironmentSlackAliasArgs
{
Id = "string",
Name = "string",
},
},
SlackChannels = new[]
{
new Rootly.Inputs.EnvironmentSlackChannelArgs
{
Id = "string",
Name = "string",
},
},
Slug = "string",
});
example, err := rootly.NewEnvironment(ctx, "environmentResource", &rootly.EnvironmentArgs{
Color: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
NotifyEmails: pulumi.StringArray{
pulumi.String("string"),
},
Position: pulumi.Int(0),
Properties: rootly.EnvironmentPropertyArray{
&rootly.EnvironmentPropertyArgs{
CatalogPropertyId: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
SlackAliases: rootly.EnvironmentSlackAliasArray{
&rootly.EnvironmentSlackAliasArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
SlackChannels: rootly.EnvironmentSlackChannelArray{
&rootly.EnvironmentSlackChannelArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
Slug: pulumi.String("string"),
})
var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
.color("string")
.description("string")
.name("string")
.notifyEmails("string")
.position(0)
.properties(EnvironmentPropertyArgs.builder()
.catalogPropertyId("string")
.value("string")
.build())
.slackAliases(EnvironmentSlackAliasArgs.builder()
.id("string")
.name("string")
.build())
.slackChannels(EnvironmentSlackChannelArgs.builder()
.id("string")
.name("string")
.build())
.slug("string")
.build());
environment_resource = rootly.Environment("environmentResource",
color="string",
description="string",
name="string",
notify_emails=["string"],
position=0,
properties=[{
"catalog_property_id": "string",
"value": "string",
}],
slack_aliases=[{
"id": "string",
"name": "string",
}],
slack_channels=[{
"id": "string",
"name": "string",
}],
slug="string")
const environmentResource = new rootly.Environment("environmentResource", {
color: "string",
description: "string",
name: "string",
notifyEmails: ["string"],
position: 0,
properties: [{
catalogPropertyId: "string",
value: "string",
}],
slackAliases: [{
id: "string",
name: "string",
}],
slackChannels: [{
id: "string",
name: "string",
}],
slug: "string",
});
type: rootly:Environment
properties:
color: string
description: string
name: string
notifyEmails:
- string
position: 0
properties:
- catalogPropertyId: string
value: string
slackAliases:
- id: string
name: string
slackChannels:
- id: string
name: string
slug: string
Environment 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 Environment resource accepts the following input properties:
- Color string
- The hex color of the environment
- Description string
- The description of the environment
- Name string
- The name of the environment
- Notify
Emails List<string> - Emails attached to the environment
- Position int
- Position of the environment
- Properties
List<Environment
Property> - Array of property values for this environment.
- Slack
Aliases List<EnvironmentSlack Alias> - Slack Aliases associated with this environment
- Slack
Channels List<EnvironmentSlack Channel> - Slack Channels associated with this environment
- Slug string
- The slug of the environment
- Color string
- The hex color of the environment
- Description string
- The description of the environment
- Name string
- The name of the environment
- Notify
Emails []string - Emails attached to the environment
- Position int
- Position of the environment
- Properties
[]Environment
Property Args - Array of property values for this environment.
- Slack
Aliases []EnvironmentSlack Alias Args - Slack Aliases associated with this environment
- Slack
Channels []EnvironmentSlack Channel Args - Slack Channels associated with this environment
- Slug string
- The slug of the environment
- color String
- The hex color of the environment
- description String
- The description of the environment
- name String
- The name of the environment
- notify
Emails List<String> - Emails attached to the environment
- position Integer
- Position of the environment
- properties
List<Environment
Property> - Array of property values for this environment.
- slack
Aliases List<EnvironmentSlack Alias> - Slack Aliases associated with this environment
- slack
Channels List<EnvironmentSlack Channel> - Slack Channels associated with this environment
- slug String
- The slug of the environment
- color string
- The hex color of the environment
- description string
- The description of the environment
- name string
- The name of the environment
- notify
Emails string[] - Emails attached to the environment
- position number
- Position of the environment
- properties
Environment
Property[] - Array of property values for this environment.
- slack
Aliases EnvironmentSlack Alias[] - Slack Aliases associated with this environment
- slack
Channels EnvironmentSlack Channel[] - Slack Channels associated with this environment
- slug string
- The slug of the environment
- color str
- The hex color of the environment
- description str
- The description of the environment
- name str
- The name of the environment
- notify_
emails Sequence[str] - Emails attached to the environment
- position int
- Position of the environment
- properties
Sequence[Environment
Property Args] - Array of property values for this environment.
- slack_
aliases Sequence[EnvironmentSlack Alias Args] - Slack Aliases associated with this environment
- slack_
channels Sequence[EnvironmentSlack Channel Args] - Slack Channels associated with this environment
- slug str
- The slug of the environment
- color String
- The hex color of the environment
- description String
- The description of the environment
- name String
- The name of the environment
- notify
Emails List<String> - Emails attached to the environment
- position Number
- Position of the environment
- properties List<Property Map>
- Array of property values for this environment.
- slack
Aliases List<Property Map> - Slack Aliases associated with this environment
- slack
Channels List<Property Map> - Slack Channels associated with this environment
- slug String
- The slug of the environment
Outputs
All input properties are implicitly available as output properties. Additionally, the Environment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Environment Resource
Get an existing Environment 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?: EnvironmentState, opts?: CustomResourceOptions): Environment@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
color: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
notify_emails: Optional[Sequence[str]] = None,
position: Optional[int] = None,
properties: Optional[Sequence[EnvironmentPropertyArgs]] = None,
slack_aliases: Optional[Sequence[EnvironmentSlackAliasArgs]] = None,
slack_channels: Optional[Sequence[EnvironmentSlackChannelArgs]] = None,
slug: Optional[str] = None) -> Environmentfunc GetEnvironment(ctx *Context, name string, id IDInput, state *EnvironmentState, opts ...ResourceOption) (*Environment, error)public static Environment Get(string name, Input<string> id, EnvironmentState? state, CustomResourceOptions? opts = null)public static Environment get(String name, Output<String> id, EnvironmentState state, CustomResourceOptions options)resources: _: type: rootly:Environment get: id: ${id}- 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.
- Color string
- The hex color of the environment
- Description string
- The description of the environment
- Name string
- The name of the environment
- Notify
Emails List<string> - Emails attached to the environment
- Position int
- Position of the environment
- Properties
List<Environment
Property> - Array of property values for this environment.
- Slack
Aliases List<EnvironmentSlack Alias> - Slack Aliases associated with this environment
- Slack
Channels List<EnvironmentSlack Channel> - Slack Channels associated with this environment
- Slug string
- The slug of the environment
- Color string
- The hex color of the environment
- Description string
- The description of the environment
- Name string
- The name of the environment
- Notify
Emails []string - Emails attached to the environment
- Position int
- Position of the environment
- Properties
[]Environment
Property Args - Array of property values for this environment.
- Slack
Aliases []EnvironmentSlack Alias Args - Slack Aliases associated with this environment
- Slack
Channels []EnvironmentSlack Channel Args - Slack Channels associated with this environment
- Slug string
- The slug of the environment
- color String
- The hex color of the environment
- description String
- The description of the environment
- name String
- The name of the environment
- notify
Emails List<String> - Emails attached to the environment
- position Integer
- Position of the environment
- properties
List<Environment
Property> - Array of property values for this environment.
- slack
Aliases List<EnvironmentSlack Alias> - Slack Aliases associated with this environment
- slack
Channels List<EnvironmentSlack Channel> - Slack Channels associated with this environment
- slug String
- The slug of the environment
- color string
- The hex color of the environment
- description string
- The description of the environment
- name string
- The name of the environment
- notify
Emails string[] - Emails attached to the environment
- position number
- Position of the environment
- properties
Environment
Property[] - Array of property values for this environment.
- slack
Aliases EnvironmentSlack Alias[] - Slack Aliases associated with this environment
- slack
Channels EnvironmentSlack Channel[] - Slack Channels associated with this environment
- slug string
- The slug of the environment
- color str
- The hex color of the environment
- description str
- The description of the environment
- name str
- The name of the environment
- notify_
emails Sequence[str] - Emails attached to the environment
- position int
- Position of the environment
- properties
Sequence[Environment
Property Args] - Array of property values for this environment.
- slack_
aliases Sequence[EnvironmentSlack Alias Args] - Slack Aliases associated with this environment
- slack_
channels Sequence[EnvironmentSlack Channel Args] - Slack Channels associated with this environment
- slug str
- The slug of the environment
- color String
- The hex color of the environment
- description String
- The description of the environment
- name String
- The name of the environment
- notify
Emails List<String> - Emails attached to the environment
- position Number
- Position of the environment
- properties List<Property Map>
- Array of property values for this environment.
- slack
Aliases List<Property Map> - Slack Aliases associated with this environment
- slack
Channels List<Property Map> - Slack Channels associated with this environment
- slug String
- The slug of the environment
Supporting Types
EnvironmentProperty, EnvironmentPropertyArgs
- Catalog
Property stringId - Catalog property ID
- Value string
- The property value
- Catalog
Property stringId - Catalog property ID
- Value string
- The property value
- catalog
Property StringId - Catalog property ID
- value String
- The property value
- catalog
Property stringId - Catalog property ID
- value string
- The property value
- catalog_
property_ strid - Catalog property ID
- value str
- The property value
- catalog
Property StringId - Catalog property ID
- value String
- The property value
EnvironmentSlackAlias, EnvironmentSlackAliasArgs
EnvironmentSlackChannel, EnvironmentSlackChannelArgs
Import
rootly.Environment can be imported using the import command.
$ pulumi import rootly:index/environment:Environment primary a816421c-6ceb-481a-87c4-585e47451f24
Or using an import block.
Locate the resource id in the web app, or retrieve it by listing resources through the API if it’s not visible in the web app.
HCL can be generated from the import block using the -generate-config-out flag.
pulumi preview -generate-config-out=generated.tf
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- rootly rootlyhq/pulumi-rootly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rootlyTerraform Provider.
published on Thursday, May 7, 2026 by rootlyhq
