1. Packages
  2. Dynatrace
  3. API Docs
  4. getTenant
Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse

dynatrace.getTenant

Explore with Pulumi AI

Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse

The data source dynatrace.getTenant evalutes the configured Environment URL (either the environment variable DYNATRACE_ENV_URL or the configuration attribute dt_env_url) and extracts out the name/id of the environment this provider addresses. Main purpose is for migrating settings from one environment to another, but it can be used to in general to avoid hard coding the environment ID like in the example below.

Using getTenant

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTenant(opts?: InvokeOptions): Promise<GetTenantResult>
function getTenantOutput(opts?: InvokeOptions): Output<GetTenantResult>
Copy
def get_tenant(opts: Optional[InvokeOptions] = None) -> GetTenantResult
def get_tenant_output(opts: Optional[InvokeOptions] = None) -> Output[GetTenantResult]
Copy
func GetTenant(ctx *Context, opts ...InvokeOption) (*GetTenantResult, error)
func GetTenantOutput(ctx *Context, opts ...InvokeOption) GetTenantResultOutput
Copy

> Note: This function is named GetTenant in the Go SDK.

public static class GetTenant 
{
    public static Task<GetTenantResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetTenantResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTenantResult> getTenant(InvokeOptions options)
public static Output<GetTenantResult> getTenant(InvokeOptions options)
Copy
fn::invoke:
  function: dynatrace:index/getTenant:getTenant
  arguments:
    # arguments dictionary
Copy

getTenant Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Id string
The provider-assigned unique ID for this managed resource.
Name string
id String
The provider-assigned unique ID for this managed resource.
name String
id string
The provider-assigned unique ID for this managed resource.
name string
id str
The provider-assigned unique ID for this managed resource.
name str
id String
The provider-assigned unique ID for this managed resource.
name String

Package Details

Repository
dynatrace pulumiverse/pulumi-dynatrace
License
Apache-2.0
Notes
This Pulumi package is based on the dynatrace Terraform Provider.
Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse