harness.cloudprovider.Gcp
Explore with Pulumi AI
Resource for creating a GCP cloud provider. This resource uses the config-as-code API’s. When updating the name or path of this resource you should typically also set the create_before_destroy = true lifecycle setting.
Create Gcp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Gcp(name: string, args?: GcpArgs, opts?: CustomResourceOptions);@overload
def Gcp(resource_name: str,
        args: Optional[GcpArgs] = None,
        opts: Optional[ResourceOptions] = None)
@overload
def Gcp(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        delegate_selectors: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        secret_file_id: Optional[str] = None,
        skip_validation: Optional[bool] = None,
        usage_scopes: Optional[Sequence[GcpUsageScopeArgs]] = None)func NewGcp(ctx *Context, name string, args *GcpArgs, opts ...ResourceOption) (*Gcp, error)public Gcp(string name, GcpArgs? args = null, CustomResourceOptions? opts = null)type: harness:cloudprovider:Gcp
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 GcpArgs
- 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 GcpArgs
- 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 GcpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GcpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GcpArgs
- 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 gcpResource = new Harness.Cloudprovider.Gcp("gcpResource", new()
{
    DelegateSelectors = new[]
    {
        "string",
    },
    Name = "string",
    SecretFileId = "string",
    SkipValidation = false,
    UsageScopes = new[]
    {
        new Harness.Cloudprovider.Inputs.GcpUsageScopeArgs
        {
            ApplicationId = "string",
            EnvironmentFilterType = "string",
            EnvironmentId = "string",
        },
    },
});
example, err := cloudprovider.NewGcp(ctx, "gcpResource", &cloudprovider.GcpArgs{
	DelegateSelectors: pulumi.StringArray{
		pulumi.String("string"),
	},
	Name:           pulumi.String("string"),
	SecretFileId:   pulumi.String("string"),
	SkipValidation: pulumi.Bool(false),
	UsageScopes: cloudprovider.GcpUsageScopeArray{
		&cloudprovider.GcpUsageScopeArgs{
			ApplicationId:         pulumi.String("string"),
			EnvironmentFilterType: pulumi.String("string"),
			EnvironmentId:         pulumi.String("string"),
		},
	},
})
var gcpResource = new Gcp("gcpResource", GcpArgs.builder()
    .delegateSelectors("string")
    .name("string")
    .secretFileId("string")
    .skipValidation(false)
    .usageScopes(GcpUsageScopeArgs.builder()
        .applicationId("string")
        .environmentFilterType("string")
        .environmentId("string")
        .build())
    .build());
gcp_resource = harness.cloudprovider.Gcp("gcpResource",
    delegate_selectors=["string"],
    name="string",
    secret_file_id="string",
    skip_validation=False,
    usage_scopes=[{
        "application_id": "string",
        "environment_filter_type": "string",
        "environment_id": "string",
    }])
const gcpResource = new harness.cloudprovider.Gcp("gcpResource", {
    delegateSelectors: ["string"],
    name: "string",
    secretFileId: "string",
    skipValidation: false,
    usageScopes: [{
        applicationId: "string",
        environmentFilterType: "string",
        environmentId: "string",
    }],
});
type: harness:cloudprovider:Gcp
properties:
    delegateSelectors:
        - string
    name: string
    secretFileId: string
    skipValidation: false
    usageScopes:
        - applicationId: string
          environmentFilterType: string
          environmentId: string
Gcp 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 Gcp resource accepts the following input properties:
- DelegateSelectors List<string>
- Delegate selectors to use for this provider.
- Name string
- The name of the cloud provider.
- SecretFile stringId 
- The id of the secret containing the GCP credentials
- SkipValidation bool
- Skip validation of GCP configuration.
- UsageScopes List<GcpUsage Scope> 
- This block is used for scoping the resource to a specific set of applications or environments.
- DelegateSelectors []string
- Delegate selectors to use for this provider.
- Name string
- The name of the cloud provider.
- SecretFile stringId 
- The id of the secret containing the GCP credentials
- SkipValidation bool
- Skip validation of GCP configuration.
- UsageScopes []GcpUsage Scope Args 
- This block is used for scoping the resource to a specific set of applications or environments.
- delegateSelectors List<String>
- Delegate selectors to use for this provider.
- name String
- The name of the cloud provider.
- secretFile StringId 
- The id of the secret containing the GCP credentials
- skipValidation Boolean
- Skip validation of GCP configuration.
- usageScopes List<GcpUsage Scope> 
- This block is used for scoping the resource to a specific set of applications or environments.
- delegateSelectors string[]
- Delegate selectors to use for this provider.
- name string
- The name of the cloud provider.
- secretFile stringId 
- The id of the secret containing the GCP credentials
- skipValidation boolean
- Skip validation of GCP configuration.
- usageScopes GcpUsage Scope[] 
- This block is used for scoping the resource to a specific set of applications or environments.
- delegate_selectors Sequence[str]
- Delegate selectors to use for this provider.
- name str
- The name of the cloud provider.
- secret_file_ strid 
- The id of the secret containing the GCP credentials
- skip_validation bool
- Skip validation of GCP configuration.
- usage_scopes Sequence[GcpUsage Scope Args] 
- This block is used for scoping the resource to a specific set of applications or environments.
- delegateSelectors List<String>
- Delegate selectors to use for this provider.
- name String
- The name of the cloud provider.
- secretFile StringId 
- The id of the secret containing the GCP credentials
- skipValidation Boolean
- Skip validation of GCP configuration.
- usageScopes List<Property Map>
- This block is used for scoping the resource to a specific set of applications or environments.
Outputs
All input properties are implicitly available as output properties. Additionally, the Gcp 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 Gcp Resource
Get an existing Gcp 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?: GcpState, opts?: CustomResourceOptions): Gcp@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        delegate_selectors: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        secret_file_id: Optional[str] = None,
        skip_validation: Optional[bool] = None,
        usage_scopes: Optional[Sequence[GcpUsageScopeArgs]] = None) -> Gcpfunc GetGcp(ctx *Context, name string, id IDInput, state *GcpState, opts ...ResourceOption) (*Gcp, error)public static Gcp Get(string name, Input<string> id, GcpState? state, CustomResourceOptions? opts = null)public static Gcp get(String name, Output<String> id, GcpState state, CustomResourceOptions options)resources:  _:    type: harness:cloudprovider:Gcp    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.
- DelegateSelectors List<string>
- Delegate selectors to use for this provider.
- Name string
- The name of the cloud provider.
- SecretFile stringId 
- The id of the secret containing the GCP credentials
- SkipValidation bool
- Skip validation of GCP configuration.
- UsageScopes List<GcpUsage Scope> 
- This block is used for scoping the resource to a specific set of applications or environments.
- DelegateSelectors []string
- Delegate selectors to use for this provider.
- Name string
- The name of the cloud provider.
- SecretFile stringId 
- The id of the secret containing the GCP credentials
- SkipValidation bool
- Skip validation of GCP configuration.
- UsageScopes []GcpUsage Scope Args 
- This block is used for scoping the resource to a specific set of applications or environments.
- delegateSelectors List<String>
- Delegate selectors to use for this provider.
- name String
- The name of the cloud provider.
- secretFile StringId 
- The id of the secret containing the GCP credentials
- skipValidation Boolean
- Skip validation of GCP configuration.
- usageScopes List<GcpUsage Scope> 
- This block is used for scoping the resource to a specific set of applications or environments.
- delegateSelectors string[]
- Delegate selectors to use for this provider.
- name string
- The name of the cloud provider.
- secretFile stringId 
- The id of the secret containing the GCP credentials
- skipValidation boolean
- Skip validation of GCP configuration.
- usageScopes GcpUsage Scope[] 
- This block is used for scoping the resource to a specific set of applications or environments.
- delegate_selectors Sequence[str]
- Delegate selectors to use for this provider.
- name str
- The name of the cloud provider.
- secret_file_ strid 
- The id of the secret containing the GCP credentials
- skip_validation bool
- Skip validation of GCP configuration.
- usage_scopes Sequence[GcpUsage Scope Args] 
- This block is used for scoping the resource to a specific set of applications or environments.
- delegateSelectors List<String>
- Delegate selectors to use for this provider.
- name String
- The name of the cloud provider.
- secretFile StringId 
- The id of the secret containing the GCP credentials
- skipValidation Boolean
- Skip validation of GCP configuration.
- usageScopes List<Property Map>
- This block is used for scoping the resource to a specific set of applications or environments.
Supporting Types
GcpUsageScope, GcpUsageScopeArgs      
- ApplicationId string
- Id of the application to scope to. If empty then this scope applies to all applications.
- EnvironmentFilter stringType 
- Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
- EnvironmentId string
- Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
- ApplicationId string
- Id of the application to scope to. If empty then this scope applies to all applications.
- EnvironmentFilter stringType 
- Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
- EnvironmentId string
- Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
- applicationId String
- Id of the application to scope to. If empty then this scope applies to all applications.
- environmentFilter StringType 
- Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
- environmentId String
- Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
- applicationId string
- Id of the application to scope to. If empty then this scope applies to all applications.
- environmentFilter stringType 
- Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
- environmentId string
- Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
- application_id str
- Id of the application to scope to. If empty then this scope applies to all applications.
- environment_filter_ strtype 
- Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
- environment_id str
- Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
- applicationId String
- Id of the application to scope to. If empty then this scope applies to all applications.
- environmentFilter StringType 
- Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
- environmentId String
- Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the harnessTerraform Provider.
