RemoteConfigRemoteConfig class

A RemoteConfig represents a Remote Config template.

To get more information about RemoteConfig, see:

Example Usage

Firebase Remote Config Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const basic = new gcp.firebase.RemoteConfigRemoteConfig("basic", {
    conditions: [{
        name: "ios_en",
        expression: "device.os == 'ios' && device.country in ['us']",
        tagColor: "TEAL",
    }],
    parameters: [{
        parameterName: "welcome_message",
        description: "Welcome message",
        valueType: "STRING",
        defaultValue: {
            value: "Welcome to the App!",
        },
        conditionalValues: [{
            conditionName: "ios_en",
            value: "Welcome to the App on iOS!",
        }],
    }],
    parameterGroups: [{
        parameterGroupName: "group_a",
        description: "Parameter group A description",
        parameters: [{
            parameterName: "welcome_message_group",
            description: "Welcome message for group A",
            valueType: "STRING",
            defaultValue: {
                value: "Welcome Group A!",
            },
            conditionalValues: [{
                conditionName: "ios_en",
                value: "Welcome Group A on iOS!",
            }],
        }],
    }],
});
import pulumi
import pulumi_gcp as gcp

basic = gcp.firebase.RemoteConfigRemoteConfig("basic",
    conditions=[{
        "name": "ios_en",
        "expression": "device.os == 'ios' && device.country in ['us']",
        "tag_color": "TEAL",
    }],
    parameters=[{
        "parameter_name": "welcome_message",
        "description": "Welcome message",
        "value_type": "STRING",
        "default_value": {
            "value": "Welcome to the App!",
        },
        "conditional_values": [{
            "condition_name": "ios_en",
            "value": "Welcome to the App on iOS!",
        }],
    }],
    parameter_groups=[{
        "parameter_group_name": "group_a",
        "description": "Parameter group A description",
        "parameters": [{
            "parameter_name": "welcome_message_group",
            "description": "Welcome message for group A",
            "value_type": "STRING",
            "default_value": {
                "value": "Welcome Group A!",
            },
            "conditional_values": [{
                "condition_name": "ios_en",
                "value": "Welcome Group A on iOS!",
            }],
        }],
    }])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var basic = new Gcp.Firebase.RemoteConfigRemoteConfig("basic", new()
    {
        Conditions = new[]
        {
            new Gcp.Firebase.Inputs.RemoteConfigRemoteConfigConditionArgs
            {
                Name = "ios_en",
                Expression = "device.os == 'ios' && device.country in ['us']",
                TagColor = "TEAL",
            },
        },
        Parameters = new[]
        {
            new Gcp.Firebase.Inputs.RemoteConfigRemoteConfigParameterArgs
            {
                ParameterName = "welcome_message",
                Description = "Welcome message",
                ValueType = "STRING",
                DefaultValue = new Gcp.Firebase.Inputs.RemoteConfigRemoteConfigParameterDefaultValueArgs
                {
                    Value = "Welcome to the App!",
                },
                ConditionalValues = new[]
                {
                    new Gcp.Firebase.Inputs.RemoteConfigRemoteConfigParameterConditionalValueArgs
                    {
                        ConditionName = "ios_en",
                        Value = "Welcome to the App on iOS!",
                    },
                },
            },
        },
        ParameterGroups = new[]
        {
            new Gcp.Firebase.Inputs.RemoteConfigRemoteConfigParameterGroupArgs
            {
                ParameterGroupName = "group_a",
                Description = "Parameter group A description",
                Parameters = new[]
                {
                    new Gcp.Firebase.Inputs.RemoteConfigRemoteConfigParameterGroupParameterArgs
                    {
                        ParameterName = "welcome_message_group",
                        Description = "Welcome message for group A",
                        ValueType = "STRING",
                        DefaultValue = new Gcp.Firebase.Inputs.RemoteConfigRemoteConfigParameterGroupParameterDefaultValueArgs
                        {
                            Value = "Welcome Group A!",
                        },
                        ConditionalValues = new[]
                        {
                            new Gcp.Firebase.Inputs.RemoteConfigRemoteConfigParameterGroupParameterConditionalValueArgs
                            {
                                ConditionName = "ios_en",
                                Value = "Welcome Group A on iOS!",
                            },
                        },
                    },
                },
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := firebase.NewRemoteConfigRemoteConfig(ctx, "basic", &firebase.RemoteConfigRemoteConfigArgs{
			Conditions: firebase.RemoteConfigRemoteConfigConditionArray{
				&firebase.RemoteConfigRemoteConfigConditionArgs{
					Name:       pulumi.String("ios_en"),
					Expression: pulumi.String("device.os == 'ios' && device.country in ['us']"),
					TagColor:   pulumi.String("TEAL"),
				},
			},
			Parameters: firebase.RemoteConfigRemoteConfigParameterArray{
				&firebase.RemoteConfigRemoteConfigParameterArgs{
					ParameterName: pulumi.String("welcome_message"),
					Description:   pulumi.String("Welcome message"),
					ValueType:     pulumi.String("STRING"),
					DefaultValue: &firebase.RemoteConfigRemoteConfigParameterDefaultValueArgs{
						Value: pulumi.String("Welcome to the App!"),
					},
					ConditionalValues: firebase.RemoteConfigRemoteConfigParameterConditionalValueArray{
						&firebase.RemoteConfigRemoteConfigParameterConditionalValueArgs{
							ConditionName: pulumi.String("ios_en"),
							Value:         pulumi.String("Welcome to the App on iOS!"),
						},
					},
				},
			},
			ParameterGroups: firebase.RemoteConfigRemoteConfigParameterGroupArray{
				&firebase.RemoteConfigRemoteConfigParameterGroupArgs{
					ParameterGroupName: pulumi.String("group_a"),
					Description:        pulumi.String("Parameter group A description"),
					Parameters: firebase.RemoteConfigRemoteConfigParameterGroupParameterArray{
						&firebase.RemoteConfigRemoteConfigParameterGroupParameterArgs{
							ParameterName: pulumi.String("welcome_message_group"),
							Description:   pulumi.String("Welcome message for group A"),
							ValueType:     pulumi.String("STRING"),
							DefaultValue: &firebase.RemoteConfigRemoteConfigParameterGroupParameterDefaultValueArgs{
								Value: pulumi.String("Welcome Group A!"),
							},
							ConditionalValues: firebase.RemoteConfigRemoteConfigParameterGroupParameterConditionalValueArray{
								&firebase.RemoteConfigRemoteConfigParameterGroupParameterConditionalValueArgs{
									ConditionName: pulumi.String("ios_en"),
									Value:         pulumi.String("Welcome Group A on iOS!"),
								},
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_firebase_remoteconfigremoteconfig" "basic" {
  conditions {
    name       = "ios_en"
    expression = "device.os == 'ios' && device.country in ['us']"
    tag_color  = "TEAL"
  }
  parameters {
    parameter_name = "welcome_message"
    description    = "Welcome message"
    value_type     = "STRING"
    default_value = {
      value = "Welcome to the App!"
    }
    conditional_values {
      condition_name = "ios_en"
      value          = "Welcome to the App on iOS!"
    }
  }
  parameter_groups {
    parameter_group_name = "group_a"
    description          = "Parameter group A description"
    parameters {
      parameter_name = "welcome_message_group"
      description    = "Welcome message for group A"
      value_type     = "STRING"
      default_value = {
        value = "Welcome Group A!"
      }
      conditional_values {
        condition_name = "ios_en"
        value          = "Welcome Group A on iOS!"
      }
    }
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.RemoteConfigRemoteConfig;
import com.pulumi.gcp.firebase.RemoteConfigRemoteConfigArgs;
import com.pulumi.gcp.firebase.inputs.RemoteConfigRemoteConfigConditionArgs;
import com.pulumi.gcp.firebase.inputs.RemoteConfigRemoteConfigParameterArgs;
import com.pulumi.gcp.firebase.inputs.RemoteConfigRemoteConfigParameterDefaultValueArgs;
import com.pulumi.gcp.firebase.inputs.RemoteConfigRemoteConfigParameterConditionalValueArgs;
import com.pulumi.gcp.firebase.inputs.RemoteConfigRemoteConfigParameterGroupArgs;
import com.pulumi.gcp.firebase.inputs.RemoteConfigRemoteConfigParameterGroupParameterArgs;
import com.pulumi.gcp.firebase.inputs.RemoteConfigRemoteConfigParameterGroupParameterDefaultValueArgs;
import com.pulumi.gcp.firebase.inputs.RemoteConfigRemoteConfigParameterGroupParameterConditionalValueArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 basic = new RemoteConfigRemoteConfig("basic", RemoteConfigRemoteConfigArgs.builder()
            .conditions(RemoteConfigRemoteConfigConditionArgs.builder()
                .name("ios_en")
                .expression("device.os == 'ios' && device.country in ['us']")
                .tagColor("TEAL")
                .build())
            .parameters(RemoteConfigRemoteConfigParameterArgs.builder()
                .parameterName("welcome_message")
                .description("Welcome message")
                .valueType("STRING")
                .defaultValue(RemoteConfigRemoteConfigParameterDefaultValueArgs.builder()
                    .value("Welcome to the App!")
                    .build())
                .conditionalValues(RemoteConfigRemoteConfigParameterConditionalValueArgs.builder()
                    .conditionName("ios_en")
                    .value("Welcome to the App on iOS!")
                    .build())
                .build())
            .parameterGroups(RemoteConfigRemoteConfigParameterGroupArgs.builder()
                .parameterGroupName("group_a")
                .description("Parameter group A description")
                .parameters(RemoteConfigRemoteConfigParameterGroupParameterArgs.builder()
                    .parameterName("welcome_message_group")
                    .description("Welcome message for group A")
                    .valueType("STRING")
                    .defaultValue(RemoteConfigRemoteConfigParameterGroupParameterDefaultValueArgs.builder()
                        .value("Welcome Group A!")
                        .build())
                    .conditionalValues(RemoteConfigRemoteConfigParameterGroupParameterConditionalValueArgs.builder()
                        .conditionName("ios_en")
                        .value("Welcome Group A on iOS!")
                        .build())
                    .build())
                .build())
            .build());

    }
}
resources:
  basic:
    type: gcp:firebase:RemoteConfigRemoteConfig
    properties:
      conditions:
        - name: ios_en
          expression: device.os == 'ios' && device.country in ['us']
          tagColor: TEAL
      parameters:
        - parameterName: welcome_message
          description: Welcome message
          valueType: STRING
          defaultValue:
            value: Welcome to the App!
          conditionalValues:
            - conditionName: ios_en
              value: Welcome to the App on iOS!
      parameterGroups:
        - parameterGroupName: group_a
          description: Parameter group A description
          parameters:
            - parameterName: welcome_message_group
              description: Welcome message for group A
              valueType: STRING
              defaultValue:
                value: Welcome Group A!
              conditionalValues:
                - conditionName: ios_en
                  value: Welcome Group A on iOS!

Import

RemoteConfig can be imported using any of these accepted formats:

  • projects/{{project}}/remoteConfig
  • {{project}}

When using the pulumi import command, RemoteConfig can be imported using one of the formats above. For example:

$ pulumi import gcp:firebase/remoteConfigRemoteConfig:RemoteConfigRemoteConfig default projects/{{project}}/remoteConfig
$ pulumi import gcp:firebase/remoteConfigRemoteConfig:RemoteConfigRemoteConfig default {{project}}

Constructors

RemoteConfigRemoteConfig(String name, {RemoteConfigRemoteConfigArgs? args, CustomResourceOptions? options})
Creates a new RemoteConfigRemoteConfig. name The Pulumi resource name. args Arguments used to configure this RemoteConfigRemoteConfig. The set of arguments for RemoteConfigRemoteConfig. options Resource options controlling this resource's behavior.
RemoteConfigRemoteConfig.reference(String urn)
Creates a typed reference to an existing RemoteConfigRemoteConfig resource.

Properties

childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
conditions ↔ Output<List<RemoteConfigRemoteConfigCondition>?>
A list of conditions in descending order by priority. The values of the condition names must be unique. Structure is documented below.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<String>
(Output) Display name.
latefinal
parameterGroups ↔ Output<List<RemoteConfigRemoteConfigParameterGroup>?>
Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. For example, a parameter group with the name "Search V2" may have the description "New mobile search view" and contain parameters for the new search's layout and font. Structure is documented below.
latefinal
parameters ↔ Output<List<RemoteConfigRemoteConfigParameter>?>
Map of parameter keys to their optional default values and optional conditional values. Structure is documented below.
latefinal
project ↔ Output<String>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
versions ↔ Output<List<RemoteConfigRemoteConfigVersion>>
Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. Structure is documented below.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {RemoteConfigRemoteConfigState? state, CustomResourceOptions? options}) → RemoteConfigRemoteConfig
Gets an existing RemoteConfigRemoteConfig resource's state with the given name and id.