Application class
Application is a functional grouping of Services and Workloads that helps achieve a desired end-to-end business functionality. Services and Workloads are owned by the Application.
Example Usage
Apphub Application Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.apphub.Application("example", {
location: "us-east1",
applicationId: "example-application",
scope: {
type: "REGIONAL",
},
});
import pulumi
import pulumi_gcp as gcp
example = gcp.apphub.Application("example",
location="us-east1",
application_id="example-application",
scope={
"type": "REGIONAL",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = new Gcp.Apphub.Application("example", new()
{
Location = "us-east1",
ApplicationId = "example-application",
Scope = new Gcp.Apphub.Inputs.ApplicationScopeArgs
{
Type = "REGIONAL",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/apphub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apphub.NewApplication(ctx, "example", &apphub.ApplicationArgs{
Location: pulumi.String("us-east1"),
ApplicationId: pulumi.String("example-application"),
Scope: &apphub.ApplicationScopeArgs{
Type: pulumi.String("REGIONAL"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_apphub_application" "example" {
location = "us-east1"
application_id = "example-application"
scope = {
type = "REGIONAL"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.apphub.Application;
import com.pulumi.gcp.apphub.ApplicationArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationScopeArgs;
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 example = new Application("example", ApplicationArgs.builder()
.location("us-east1")
.applicationId("example-application")
.scope(ApplicationScopeArgs.builder()
.type("REGIONAL")
.build())
.build());
}
}
resources:
example:
type: gcp:apphub:Application
properties:
location: us-east1
applicationId: example-application
scope:
type: REGIONAL
Apphub Application Global Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.apphub.Application("example", {
location: "global",
applicationId: "example-application",
scope: {
type: "GLOBAL",
},
});
import pulumi
import pulumi_gcp as gcp
example = gcp.apphub.Application("example",
location="global",
application_id="example-application",
scope={
"type": "GLOBAL",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = new Gcp.Apphub.Application("example", new()
{
Location = "global",
ApplicationId = "example-application",
Scope = new Gcp.Apphub.Inputs.ApplicationScopeArgs
{
Type = "GLOBAL",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/apphub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apphub.NewApplication(ctx, "example", &apphub.ApplicationArgs{
Location: pulumi.String("global"),
ApplicationId: pulumi.String("example-application"),
Scope: &apphub.ApplicationScopeArgs{
Type: pulumi.String("GLOBAL"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_apphub_application" "example" {
location = "global"
application_id = "example-application"
scope = {
type = "GLOBAL"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.apphub.Application;
import com.pulumi.gcp.apphub.ApplicationArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationScopeArgs;
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 example = new Application("example", ApplicationArgs.builder()
.location("global")
.applicationId("example-application")
.scope(ApplicationScopeArgs.builder()
.type("GLOBAL")
.build())
.build());
}
}
resources:
example:
type: gcp:apphub:Application
properties:
location: global
applicationId: example-application
scope:
type: GLOBAL
Apphub Application Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example2 = new gcp.apphub.Application("example2", {
location: "us-east1",
applicationId: "example-application",
displayName: "Application Full",
scope: {
type: "REGIONAL",
},
description: "Application for testing",
attributes: {
environment: {
type: "STAGING",
},
criticality: {
type: "MISSION_CRITICAL",
},
businessOwners: [{
displayName: "Alice",
email: "alice@google.com",
}],
developerOwners: [{
displayName: "Bob",
email: "bob@google.com",
}],
operatorOwners: [{
displayName: "Charlie",
email: "charlie@google.com",
}],
},
});
import pulumi
import pulumi_gcp as gcp
example2 = gcp.apphub.Application("example2",
location="us-east1",
application_id="example-application",
display_name="Application Full",
scope={
"type": "REGIONAL",
},
description="Application for testing",
attributes={
"environment": {
"type": "STAGING",
},
"criticality": {
"type": "MISSION_CRITICAL",
},
"business_owners": [{
"display_name": "Alice",
"email": "alice@google.com",
}],
"developer_owners": [{
"display_name": "Bob",
"email": "bob@google.com",
}],
"operator_owners": [{
"display_name": "Charlie",
"email": "charlie@google.com",
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example2 = new Gcp.Apphub.Application("example2", new()
{
Location = "us-east1",
ApplicationId = "example-application",
DisplayName = "Application Full",
Scope = new Gcp.Apphub.Inputs.ApplicationScopeArgs
{
Type = "REGIONAL",
},
Description = "Application for testing",
Attributes = new Gcp.Apphub.Inputs.ApplicationAttributesArgs
{
Environment = new Gcp.Apphub.Inputs.ApplicationAttributesEnvironmentArgs
{
Type = "STAGING",
},
Criticality = new Gcp.Apphub.Inputs.ApplicationAttributesCriticalityArgs
{
Type = "MISSION_CRITICAL",
},
BusinessOwners = new[]
{
new Gcp.Apphub.Inputs.ApplicationAttributesBusinessOwnerArgs
{
DisplayName = "Alice",
Email = "alice@google.com",
},
},
DeveloperOwners = new[]
{
new Gcp.Apphub.Inputs.ApplicationAttributesDeveloperOwnerArgs
{
DisplayName = "Bob",
Email = "bob@google.com",
},
},
OperatorOwners = new[]
{
new Gcp.Apphub.Inputs.ApplicationAttributesOperatorOwnerArgs
{
DisplayName = "Charlie",
Email = "charlie@google.com",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/apphub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apphub.NewApplication(ctx, "example2", &apphub.ApplicationArgs{
Location: pulumi.String("us-east1"),
ApplicationId: pulumi.String("example-application"),
DisplayName: pulumi.String("Application Full"),
Scope: &apphub.ApplicationScopeArgs{
Type: pulumi.String("REGIONAL"),
},
Description: pulumi.String("Application for testing"),
Attributes: &apphub.ApplicationAttributesArgs{
Environment: &apphub.ApplicationAttributesEnvironmentArgs{
Type: pulumi.String("STAGING"),
},
Criticality: &apphub.ApplicationAttributesCriticalityArgs{
Type: pulumi.String("MISSION_CRITICAL"),
},
BusinessOwners: apphub.ApplicationAttributesBusinessOwnerArray{
&apphub.ApplicationAttributesBusinessOwnerArgs{
DisplayName: pulumi.String("Alice"),
Email: pulumi.String("alice@google.com"),
},
},
DeveloperOwners: apphub.ApplicationAttributesDeveloperOwnerArray{
&apphub.ApplicationAttributesDeveloperOwnerArgs{
DisplayName: pulumi.String("Bob"),
Email: pulumi.String("bob@google.com"),
},
},
OperatorOwners: apphub.ApplicationAttributesOperatorOwnerArray{
&apphub.ApplicationAttributesOperatorOwnerArgs{
DisplayName: pulumi.String("Charlie"),
Email: pulumi.String("charlie@google.com"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_apphub_application" "example2" {
location = "us-east1"
application_id = "example-application"
display_name = "Application Full"
scope = {
type = "REGIONAL"
}
description = "Application for testing"
attributes = {
environment = {
type = "STAGING"
}
criticality = {
type = "MISSION_CRITICAL"
}
business_owners = [{
"displayName" = "Alice"
"email" = "alice@google.com"
}]
developer_owners = [{
"displayName" = "Bob"
"email" = "bob@google.com"
}]
operator_owners = [{
"displayName" = "Charlie"
"email" = "charlie@google.com"
}]
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.apphub.Application;
import com.pulumi.gcp.apphub.ApplicationArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationScopeArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationAttributesArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationAttributesEnvironmentArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationAttributesCriticalityArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationAttributesBusinessOwnerArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationAttributesDeveloperOwnerArgs;
import com.pulumi.gcp.apphub.inputs.ApplicationAttributesOperatorOwnerArgs;
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 example2 = new Application("example2", ApplicationArgs.builder()
.location("us-east1")
.applicationId("example-application")
.displayName("Application Full")
.scope(ApplicationScopeArgs.builder()
.type("REGIONAL")
.build())
.description("Application for testing")
.attributes(ApplicationAttributesArgs.builder()
.environment(ApplicationAttributesEnvironmentArgs.builder()
.type("STAGING")
.build())
.criticality(ApplicationAttributesCriticalityArgs.builder()
.type("MISSION_CRITICAL")
.build())
.businessOwners(ApplicationAttributesBusinessOwnerArgs.builder()
.displayName("Alice")
.email("alice@google.com")
.build())
.developerOwners(ApplicationAttributesDeveloperOwnerArgs.builder()
.displayName("Bob")
.email("bob@google.com")
.build())
.operatorOwners(ApplicationAttributesOperatorOwnerArgs.builder()
.displayName("Charlie")
.email("charlie@google.com")
.build())
.build())
.build());
}
}
resources:
example2:
type: gcp:apphub:Application
properties:
location: us-east1
applicationId: example-application
displayName: Application Full
scope:
type: REGIONAL
description: Application for testing
attributes:
environment:
type: STAGING
criticality:
type: MISSION_CRITICAL
businessOwners:
- displayName: Alice
email: alice@google.com
developerOwners:
- displayName: Bob
email: bob@google.com
operatorOwners:
- displayName: Charlie
email: charlie@google.com
Import
Application can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/applications/{{application_id}}{{project}}/{{location}}/{{application_id}}{{location}}/{{application_id}}
When using the pulumi import command, Application can be imported using one of the formats above. For example:
$ pulumi import gcp:apphub/application:Application default projects/{{project}}/locations/{{location}}/applications/{{application_id}}
$ pulumi import gcp:apphub/application:Application default {{project}}/{{location}}/{{application_id}}
$ pulumi import gcp:apphub/application:Application default {{location}}/{{application_id}}
Constructors
- Application(String name, {ApplicationArgs? args, CustomResourceOptions? options})
-
Creates a new Application.
nameThe Pulumi resource name.argsArguments used to configure this Application. The set of arguments for Application.optionsResource options controlling this resource's behavior. - Application.reference(String urn)
- Creates a typed reference to an existing Application resource.
Properties
-
applicationId
↔ Output<
String> -
Required. The Application identifier.
latefinal
-
attributes
↔ Output<
ApplicationAttributes?> -
Consumer provided attributes.
Structure is documented below.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createTime
↔ Output<
String> -
Output only. Create time.
latefinal
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
description
↔ Output<
String?> -
Optional. User-defined description of an Application.
latefinal
-
displayName
↔ Output<
String?> -
Optional. User-defined name for the Application.
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
-
location
↔ Output<
String> -
Part of
parent. See documentation ofprojectsId.latefinal -
name
↔ Output<
String> -
Identifier. The resource name of an Application. Format:
"projects/{host-project-id}/locations/{location}/applications/{application-id}"
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
-
scope
↔ Output<
ApplicationScope> -
Scope of an application.
Structure is documented below.
latefinal
-
state
↔ Output<
String> -
Output only. Application state.
Possible values:
STATE_UNSPECIFIED
CREATING
ACTIVE
DELETING
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
uid
↔ Output<
String> -
Output only. A universally unique identifier (in UUID4 format) for the
Application.latefinal -
updateTime
↔ Output<
String> -
Output only. Update time.
latefinal
-
urn
↔ Output<
String> -
latefinalinherited
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, {ApplicationState? state, CustomResourceOptions? options}) → Application -
Gets an existing Application resource's state with the given
nameandid.