1. Packages
  2. Packages
  3. Rootly
  4. API Docs
  5. Environment
Viewing docs for Rootly v3.3.0
published on Thursday, May 7, 2026 by rootlyhq
rootly logo
Viewing docs for Rootly v3.3.0
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
    NotifyEmails List<string>
    Emails attached to the environment
    Position int
    Position of the environment
    Properties List<EnvironmentProperty>
    Array of property values for this environment.
    SlackAliases List<EnvironmentSlackAlias>
    Slack Aliases associated with this environment
    SlackChannels List<EnvironmentSlackChannel>
    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
    NotifyEmails []string
    Emails attached to the environment
    Position int
    Position of the environment
    Properties []EnvironmentPropertyArgs
    Array of property values for this environment.
    SlackAliases []EnvironmentSlackAliasArgs
    Slack Aliases associated with this environment
    SlackChannels []EnvironmentSlackChannelArgs
    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
    notifyEmails List<String>
    Emails attached to the environment
    position Integer
    Position of the environment
    properties List<EnvironmentProperty>
    Array of property values for this environment.
    slackAliases List<EnvironmentSlackAlias>
    Slack Aliases associated with this environment
    slackChannels List<EnvironmentSlackChannel>
    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
    notifyEmails string[]
    Emails attached to the environment
    position number
    Position of the environment
    properties EnvironmentProperty[]
    Array of property values for this environment.
    slackAliases EnvironmentSlackAlias[]
    Slack Aliases associated with this environment
    slackChannels EnvironmentSlackChannel[]
    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[EnvironmentPropertyArgs]
    Array of property values for this environment.
    slack_aliases Sequence[EnvironmentSlackAliasArgs]
    Slack Aliases associated with this environment
    slack_channels Sequence[EnvironmentSlackChannelArgs]
    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
    notifyEmails List<String>
    Emails attached to the environment
    position Number
    Position of the environment
    properties List<Property Map>
    Array of property values for this environment.
    slackAliases List<Property Map>
    Slack Aliases associated with this environment
    slackChannels 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) -> Environment
    func 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.
    The following state arguments are supported:
    Color string
    The hex color of the environment
    Description string
    The description of the environment
    Name string
    The name of the environment
    NotifyEmails List<string>
    Emails attached to the environment
    Position int
    Position of the environment
    Properties List<EnvironmentProperty>
    Array of property values for this environment.
    SlackAliases List<EnvironmentSlackAlias>
    Slack Aliases associated with this environment
    SlackChannels List<EnvironmentSlackChannel>
    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
    NotifyEmails []string
    Emails attached to the environment
    Position int
    Position of the environment
    Properties []EnvironmentPropertyArgs
    Array of property values for this environment.
    SlackAliases []EnvironmentSlackAliasArgs
    Slack Aliases associated with this environment
    SlackChannels []EnvironmentSlackChannelArgs
    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
    notifyEmails List<String>
    Emails attached to the environment
    position Integer
    Position of the environment
    properties List<EnvironmentProperty>
    Array of property values for this environment.
    slackAliases List<EnvironmentSlackAlias>
    Slack Aliases associated with this environment
    slackChannels List<EnvironmentSlackChannel>
    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
    notifyEmails string[]
    Emails attached to the environment
    position number
    Position of the environment
    properties EnvironmentProperty[]
    Array of property values for this environment.
    slackAliases EnvironmentSlackAlias[]
    Slack Aliases associated with this environment
    slackChannels EnvironmentSlackChannel[]
    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[EnvironmentPropertyArgs]
    Array of property values for this environment.
    slack_aliases Sequence[EnvironmentSlackAliasArgs]
    Slack Aliases associated with this environment
    slack_channels Sequence[EnvironmentSlackChannelArgs]
    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
    notifyEmails List<String>
    Emails attached to the environment
    position Number
    Position of the environment
    properties List<Property Map>
    Array of property values for this environment.
    slackAliases List<Property Map>
    Slack Aliases associated with this environment
    slackChannels List<Property Map>
    Slack Channels associated with this environment
    slug String
    The slug of the environment

    Supporting Types

    EnvironmentProperty, EnvironmentPropertyArgs

    CatalogPropertyId string
    Catalog property ID
    Value string
    The property value
    CatalogPropertyId string
    Catalog property ID
    Value string
    The property value
    catalogPropertyId String
    Catalog property ID
    value String
    The property value
    catalogPropertyId string
    Catalog property ID
    value string
    The property value
    catalog_property_id str
    Catalog property ID
    value str
    The property value
    catalogPropertyId String
    Catalog property ID
    value String
    The property value

    EnvironmentSlackAlias, EnvironmentSlackAliasArgs

    Id string
    Slack alias ID
    Name string
    Slack alias name
    Id string
    Slack alias ID
    Name string
    Slack alias name
    id String
    Slack alias ID
    name String
    Slack alias name
    id string
    Slack alias ID
    name string
    Slack alias name
    id str
    Slack alias ID
    name str
    Slack alias name
    id String
    Slack alias ID
    name String
    Slack alias name

    EnvironmentSlackChannel, EnvironmentSlackChannelArgs

    Id string
    Slack channel ID
    Name string
    Slack channel name
    Id string
    Slack channel ID
    Name string
    Slack channel name
    id String
    Slack channel ID
    name String
    Slack channel name
    id string
    Slack channel ID
    name string
    Slack channel name
    id str
    Slack channel ID
    name str
    Slack channel name
    id String
    Slack channel ID
    name String
    Slack channel name

    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 rootly Terraform Provider.
    rootly logo
    Viewing docs for Rootly v3.3.0
    published on Thursday, May 7, 2026 by rootlyhq
      Try Pulumi Cloud free. Your team will thank you.