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:
- Delegate
Selectors List<string> - Delegate selectors to use for this provider.
- Name string
- The name of the cloud provider.
- Secret
File stringId - The id of the secret containing the GCP credentials
- Skip
Validation bool - Skip validation of GCP configuration.
- Usage
Scopes List<GcpUsage Scope> - This block is used for scoping the resource to a specific set of applications or environments.
- Delegate
Selectors []string - Delegate selectors to use for this provider.
- Name string
- The name of the cloud provider.
- Secret
File stringId - The id of the secret containing the GCP credentials
- Skip
Validation bool - Skip validation of GCP configuration.
- Usage
Scopes []GcpUsage Scope Args - This block is used for scoping the resource to a specific set of applications or environments.
- delegate
Selectors List<String> - Delegate selectors to use for this provider.
- name String
- The name of the cloud provider.
- secret
File StringId - The id of the secret containing the GCP credentials
- skip
Validation Boolean - Skip validation of GCP configuration.
- usage
Scopes List<GcpUsage Scope> - This block is used for scoping the resource to a specific set of applications or environments.
- delegate
Selectors string[] - Delegate selectors to use for this provider.
- name string
- The name of the cloud provider.
- secret
File stringId - The id of the secret containing the GCP credentials
- skip
Validation boolean - Skip validation of GCP configuration.
- usage
Scopes 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.
- delegate
Selectors List<String> - Delegate selectors to use for this provider.
- name String
- The name of the cloud provider.
- secret
File StringId - The id of the secret containing the GCP credentials
- skip
Validation Boolean - Skip validation of GCP configuration.
- usage
Scopes 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) -> Gcp
func 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)
Resource lookup is not supported in YAML
- 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.
- Delegate
Selectors List<string> - Delegate selectors to use for this provider.
- Name string
- The name of the cloud provider.
- Secret
File stringId - The id of the secret containing the GCP credentials
- Skip
Validation bool - Skip validation of GCP configuration.
- Usage
Scopes List<GcpUsage Scope> - This block is used for scoping the resource to a specific set of applications or environments.
- Delegate
Selectors []string - Delegate selectors to use for this provider.
- Name string
- The name of the cloud provider.
- Secret
File stringId - The id of the secret containing the GCP credentials
- Skip
Validation bool - Skip validation of GCP configuration.
- Usage
Scopes []GcpUsage Scope Args - This block is used for scoping the resource to a specific set of applications or environments.
- delegate
Selectors List<String> - Delegate selectors to use for this provider.
- name String
- The name of the cloud provider.
- secret
File StringId - The id of the secret containing the GCP credentials
- skip
Validation Boolean - Skip validation of GCP configuration.
- usage
Scopes List<GcpUsage Scope> - This block is used for scoping the resource to a specific set of applications or environments.
- delegate
Selectors string[] - Delegate selectors to use for this provider.
- name string
- The name of the cloud provider.
- secret
File stringId - The id of the secret containing the GCP credentials
- skip
Validation boolean - Skip validation of GCP configuration.
- usage
Scopes 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.
- delegate
Selectors List<String> - Delegate selectors to use for this provider.
- name String
- The name of the cloud provider.
- secret
File StringId - The id of the secret containing the GCP credentials
- skip
Validation Boolean - Skip validation of GCP configuration.
- usage
Scopes List<Property Map> - This block is used for scoping the resource to a specific set of applications or environments.
Supporting Types
GcpUsageScope, GcpUsageScopeArgs
- Application
Id string - Id of the application to scope to. If empty then this scope applies to all applications.
- Environment
Filter stringType - Type of environment filter applied. Cannot be used with
environment_id
. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS. - Environment
Id string - Id of the id of the specific environment to scope to. Cannot be used with
environment_filter_type
.
- Application
Id string - Id of the application to scope to. If empty then this scope applies to all applications.
- Environment
Filter stringType - Type of environment filter applied. Cannot be used with
environment_id
. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS. - Environment
Id string - Id of the id of the specific environment to scope to. Cannot be used with
environment_filter_type
.
- application
Id String - Id of the application to scope to. If empty then this scope applies to all applications.
- environment
Filter StringType - Type of environment filter applied. Cannot be used with
environment_id
. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS. - environment
Id String - Id of the id of the specific environment to scope to. Cannot be used with
environment_filter_type
.
- application
Id string - Id of the application to scope to. If empty then this scope applies to all applications.
- environment
Filter stringType - Type of environment filter applied. Cannot be used with
environment_id
. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS. - environment
Id 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
.
- application
Id String - Id of the application to scope to. If empty then this scope applies to all applications.
- environment
Filter StringType - Type of environment filter applied. Cannot be used with
environment_id
. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS. - environment
Id 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
harness
Terraform Provider.