spectrocloud.Macros
Explore with Pulumi AI
A resource for creating and managing service output variables and macros.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
const projectMacro = new spectrocloud.Macros("projectMacro", {
macros: {
project_macro_1: "val1",
project_macro_2: "val2",
},
project: "Default",
});
const tenantMacro = new spectrocloud.Macros("tenantMacro", {macros: {
tenant_macro_1: "tenant_val2",
}});
import pulumi
import pulumi_spectrocloud as spectrocloud
project_macro = spectrocloud.Macros("projectMacro",
macros={
"project_macro_1": "val1",
"project_macro_2": "val2",
},
project="Default")
tenant_macro = spectrocloud.Macros("tenantMacro", macros={
"tenant_macro_1": "tenant_val2",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := spectrocloud.NewMacros(ctx, "projectMacro", &spectrocloud.MacrosArgs{
Macros: pulumi.StringMap{
"project_macro_1": pulumi.String("val1"),
"project_macro_2": pulumi.String("val2"),
},
Project: pulumi.String("Default"),
})
if err != nil {
return err
}
_, err = spectrocloud.NewMacros(ctx, "tenantMacro", &spectrocloud.MacrosArgs{
Macros: pulumi.StringMap{
"tenant_macro_1": pulumi.String("tenant_val2"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
var projectMacro = new Spectrocloud.Macros("projectMacro", new()
{
Macros =
{
{ "project_macro_1", "val1" },
{ "project_macro_2", "val2" },
},
Project = "Default",
});
var tenantMacro = new Spectrocloud.Macros("tenantMacro", new()
{
Macros =
{
{ "tenant_macro_1", "tenant_val2" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spectrocloud.Macros;
import com.pulumi.spectrocloud.MacrosArgs;
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 projectMacro = new Macros("projectMacro", MacrosArgs.builder()
.macros(Map.ofEntries(
Map.entry("project_macro_1", "val1"),
Map.entry("project_macro_2", "val2")
))
.project("Default")
.build());
var tenantMacro = new Macros("tenantMacro", MacrosArgs.builder()
.macros(Map.of("tenant_macro_1", "tenant_val2"))
.build());
}
}
resources:
projectMacro:
type: spectrocloud:Macros
properties:
macros:
project_macro_1: val1
project_macro_2: val2
project: Default
tenantMacro:
type: spectrocloud:Macros
properties:
macros:
tenant_macro_1: tenant_val2
Create Macros Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Macros(name: string, args: MacrosArgs, opts?: CustomResourceOptions);
@overload
def Macros(resource_name: str,
args: MacrosArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Macros(resource_name: str,
opts: Optional[ResourceOptions] = None,
macros: Optional[Mapping[str, str]] = None,
macros_id: Optional[str] = None,
project: Optional[str] = None,
timeouts: Optional[MacrosTimeoutsArgs] = None)
func NewMacros(ctx *Context, name string, args MacrosArgs, opts ...ResourceOption) (*Macros, error)
public Macros(string name, MacrosArgs args, CustomResourceOptions? opts = null)
public Macros(String name, MacrosArgs args)
public Macros(String name, MacrosArgs args, CustomResourceOptions options)
type: spectrocloud:Macros
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 MacrosArgs
- 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 MacrosArgs
- 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 MacrosArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MacrosArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MacrosArgs
- 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 macrosResource = new Spectrocloud.Macros("macrosResource", new()
{
Macros =
{
{ "string", "string" },
},
MacrosId = "string",
Project = "string",
Timeouts = new Spectrocloud.Inputs.MacrosTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := spectrocloud.NewMacros(ctx, "macrosResource", &spectrocloud.MacrosArgs{
Macros: pulumi.StringMap{
"string": pulumi.String("string"),
},
MacrosId: pulumi.String("string"),
Project: pulumi.String("string"),
Timeouts: &spectrocloud.MacrosTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var macrosResource = new Macros("macrosResource", MacrosArgs.builder()
.macros(Map.of("string", "string"))
.macrosId("string")
.project("string")
.timeouts(MacrosTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
macros_resource = spectrocloud.Macros("macrosResource",
macros={
"string": "string",
},
macros_id="string",
project="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const macrosResource = new spectrocloud.Macros("macrosResource", {
macros: {
string: "string",
},
macrosId: "string",
project: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: spectrocloud:Macros
properties:
macros:
string: string
macrosId: string
project: string
timeouts:
create: string
delete: string
update: string
Macros 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 Macros resource accepts the following input properties:
- Macros Dictionary<string, string>
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- Macros
Id string - The ID of this resource.
- Project string
- The Spectro Cloud project name.
- Timeouts
Macros
Timeouts
- Macros map[string]string
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- Macros
Id string - The ID of this resource.
- Project string
- The Spectro Cloud project name.
- Timeouts
Macros
Timeouts Args
- macros Map<String,String>
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- macros
Id String - The ID of this resource.
- project String
- The Spectro Cloud project name.
- timeouts
Macros
Timeouts
- macros {[key: string]: string}
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- macros
Id string - The ID of this resource.
- project string
- The Spectro Cloud project name.
- timeouts
Macros
Timeouts
- macros Mapping[str, str]
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- macros_
id str - The ID of this resource.
- project str
- The Spectro Cloud project name.
- timeouts
Macros
Timeouts Args
- macros Map<String>
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- macros
Id String - The ID of this resource.
- project String
- The Spectro Cloud project name.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Macros 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 Macros Resource
Get an existing Macros 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?: MacrosState, opts?: CustomResourceOptions): Macros
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
macros: Optional[Mapping[str, str]] = None,
macros_id: Optional[str] = None,
project: Optional[str] = None,
timeouts: Optional[MacrosTimeoutsArgs] = None) -> Macros
func GetMacros(ctx *Context, name string, id IDInput, state *MacrosState, opts ...ResourceOption) (*Macros, error)
public static Macros Get(string name, Input<string> id, MacrosState? state, CustomResourceOptions? opts = null)
public static Macros get(String name, Output<String> id, MacrosState state, CustomResourceOptions options)
resources: _: type: spectrocloud:Macros 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.
- Macros Dictionary<string, string>
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- Macros
Id string - The ID of this resource.
- Project string
- The Spectro Cloud project name.
- Timeouts
Macros
Timeouts
- Macros map[string]string
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- Macros
Id string - The ID of this resource.
- Project string
- The Spectro Cloud project name.
- Timeouts
Macros
Timeouts Args
- macros Map<String,String>
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- macros
Id String - The ID of this resource.
- project String
- The Spectro Cloud project name.
- timeouts
Macros
Timeouts
- macros {[key: string]: string}
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- macros
Id string - The ID of this resource.
- project string
- The Spectro Cloud project name.
- timeouts
Macros
Timeouts
- macros Mapping[str, str]
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- macros_
id str - The ID of this resource.
- project str
- The Spectro Cloud project name.
- timeouts
Macros
Timeouts Args
- macros Map<String>
- The key-value mapping includes the macro name and its corresponding value, representing either a macro or a service variable output.
- macros
Id String - The ID of this resource.
- project String
- The Spectro Cloud project name.
- timeouts Property Map
Supporting Types
MacrosTimeouts, MacrosTimeoutsArgs
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloud
Terraform Provider.