Skip to content

Commit

Permalink
Merge pull request #2 from terraform-cdk-providers/auto/provider-upgrade
Browse files Browse the repository at this point in the history
chore: upgrade provider
  • Loading branch information
skorfmann authored Jun 18, 2021
2 parents a85a731 + fd7c75c commit c965259
Show file tree
Hide file tree
Showing 17 changed files with 1,373 additions and 779 deletions.
853 changes: 497 additions & 356 deletions API.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions src/dashboard-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export interface DashboardJsonConfig extends cdktf.TerraformMetaArguments {
*/
readonly dashboard: string;
/**
* The list of dashboard lists this dashboard belongs to.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/dashboard_json.html#dashboard_lists DashboardJson#dashboard_lists}
*/
readonly dashboardLists?: number[];
/**
* The URL of the dashboard.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/dashboard_json.html#url DashboardJson#url}
Expand Down Expand Up @@ -49,6 +55,7 @@ export class DashboardJson extends cdktf.TerraformResource {
lifecycle: config.lifecycle
});
this._dashboard = config.dashboard;
this._dashboardLists = config.dashboardLists;
this._url = config.url;
}

Expand All @@ -69,6 +76,27 @@ export class DashboardJson extends cdktf.TerraformResource {
return this._dashboard
}

// dashboard_lists - computed: false, optional: true, required: false
private _dashboardLists?: number[];
public get dashboardLists() {
return this.interpolationForAttribute('dashboard_lists') as any;
}
public set dashboardLists(value: number[] ) {
this._dashboardLists = value;
}
public resetDashboardLists() {
this._dashboardLists = undefined;
}
// Temporarily expose input value. Use with caution.
public get dashboardListsInput() {
return this._dashboardLists
}

// dashboard_lists_removed - computed: true, optional: false, required: false
public get dashboardListsRemoved() {
return this.interpolationForAttribute('dashboard_lists_removed') as any;
}

// id - computed: true, optional: true, required: false
public get id() {
return this.getStringAttribute('id');
Expand Down Expand Up @@ -97,6 +125,7 @@ export class DashboardJson extends cdktf.TerraformResource {
protected synthesizeAttributes(): { [name: string]: any } {
return {
dashboard: cdktf.stringToTerraform(this._dashboard),
dashboard_lists: cdktf.listMapper(cdktf.numberToTerraform)(this._dashboardLists),
url: cdktf.stringToTerraform(this._url),
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/dashboard-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface DashboardListDashItem {
*/
readonly dashId: string;
/**
* The type of this dashboard. Available options are: `custom_timeboard`, `custom_screenboard`, `integration_screenboard`, `integration_timeboard`, and `host_timeboard`
* The type of this dashboard. Valid values are `custom_timeboard`, `custom_screenboard`, `integration_screenboard`, `integration_timeboard`, `host_timeboard`.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/dashboard_list.html#type DashboardList#type}
*/
Expand Down
1,058 changes: 681 additions & 377 deletions src/dashboard.ts

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/downtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ export class Downtime extends cdktf.TerraformResource {
return this.getBooleanAttribute('active');
}

// active_child_id - computed: true, optional: false, required: false
public get activeChildId() {
return this.getNumberAttribute('active_child_id');
}

// disabled - computed: true, optional: false, required: false
public get disabled() {
return this.getBooleanAttribute('disabled');
Expand Down
2 changes: 1 addition & 1 deletion src/integration-aws-tag-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface IntegrationAwsTagFilterConfig extends cdktf.TerraformMetaArgume
*/
readonly accountId: string;
/**
* The namespace associated with the tag filter entry. Allowed enum values: 'elb', 'application_elb', 'sqs', 'rds', 'custom', 'network_elb,lambda'
* The namespace associated with the tag filter entry. Valid values are `elb`, `application_elb`, `sqs`, `rds`, `custom`, `network_elb`, `lambda`.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/integration_aws_tag_filter.html#namespace IntegrationAwsTagFilter#namespace}
*/
Expand Down
74 changes: 64 additions & 10 deletions src/integration-aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ import * as cdktf from 'cdktf';
// Configuration

export interface IntegrationAwsConfig extends cdktf.TerraformMetaArguments {
/**
* Your AWS access key ID. Only required if your AWS account is a GovCloud or China account.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/integration_aws.html#access_key_id IntegrationAws#access_key_id}
*/
readonly accessKeyId?: string;
/**
* Your AWS Account ID without dashes.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/integration_aws.html#account_id IntegrationAws#account_id}
*/
readonly accountId: string;
readonly accountId?: string;
/**
* Enables or disables metric collection for specific AWS namespaces for this AWS account only. A list of namespaces can be found at the [available namespace rules API endpoint](https://docs.datadoghq.com/api/v1/aws-integration/#list-namespace-rules).
*
Expand Down Expand Up @@ -42,7 +48,13 @@ export interface IntegrationAwsConfig extends cdktf.TerraformMetaArguments {
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/integration_aws.html#role_name IntegrationAws#role_name}
*/
readonly roleName: string;
readonly roleName?: string;
/**
* Your AWS secret access key. Only required if your AWS account is a GovCloud or China account.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/integration_aws.html#secret_access_key IntegrationAws#secret_access_key}
*/
readonly secretAccessKey?: string;
}

/**
Expand All @@ -59,9 +71,9 @@ export class IntegrationAws extends cdktf.TerraformResource {
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options IntegrationAwsConfig
* @param options IntegrationAwsConfig = {}
*/
public constructor(scope: Construct, id: string, config: IntegrationAwsConfig) {
public constructor(scope: Construct, id: string, config: IntegrationAwsConfig = {}) {
super(scope, id, {
terraformResourceType: 'datadog_integration_aws',
terraformGeneratorMetadata: {
Expand All @@ -72,26 +84,47 @@ export class IntegrationAws extends cdktf.TerraformResource {
count: config.count,
lifecycle: config.lifecycle
});
this._accessKeyId = config.accessKeyId;
this._accountId = config.accountId;
this._accountSpecificNamespaceRules = config.accountSpecificNamespaceRules;
this._excludedRegions = config.excludedRegions;
this._filterTags = config.filterTags;
this._hostTags = config.hostTags;
this._roleName = config.roleName;
this._secretAccessKey = config.secretAccessKey;
}

// ==========
// ATTRIBUTES
// ==========

// account_id - computed: false, optional: false, required: true
private _accountId: string;
// access_key_id - computed: false, optional: true, required: false
private _accessKeyId?: string;
public get accessKeyId() {
return this.getStringAttribute('access_key_id');
}
public set accessKeyId(value: string ) {
this._accessKeyId = value;
}
public resetAccessKeyId() {
this._accessKeyId = undefined;
}
// Temporarily expose input value. Use with caution.
public get accessKeyIdInput() {
return this._accessKeyId
}

// account_id - computed: false, optional: true, required: false
private _accountId?: string;
public get accountId() {
return this.getStringAttribute('account_id');
}
public set accountId(value: string) {
public set accountId(value: string ) {
this._accountId = value;
}
public resetAccountId() {
this._accountId = undefined;
}
// Temporarily expose input value. Use with caution.
public get accountIdInput() {
return this._accountId
Expand Down Expand Up @@ -171,31 +204,52 @@ export class IntegrationAws extends cdktf.TerraformResource {
return this.getStringAttribute('id');
}

// role_name - computed: false, optional: false, required: true
private _roleName: string;
// role_name - computed: false, optional: true, required: false
private _roleName?: string;
public get roleName() {
return this.getStringAttribute('role_name');
}
public set roleName(value: string) {
public set roleName(value: string ) {
this._roleName = value;
}
public resetRoleName() {
this._roleName = undefined;
}
// Temporarily expose input value. Use with caution.
public get roleNameInput() {
return this._roleName
}

// secret_access_key - computed: false, optional: true, required: false
private _secretAccessKey?: string;
public get secretAccessKey() {
return this.getStringAttribute('secret_access_key');
}
public set secretAccessKey(value: string ) {
this._secretAccessKey = value;
}
public resetSecretAccessKey() {
this._secretAccessKey = undefined;
}
// Temporarily expose input value. Use with caution.
public get secretAccessKeyInput() {
return this._secretAccessKey
}

// =========
// SYNTHESIS
// =========

protected synthesizeAttributes(): { [name: string]: any } {
return {
access_key_id: cdktf.stringToTerraform(this._accessKeyId),
account_id: cdktf.stringToTerraform(this._accountId),
account_specific_namespace_rules: cdktf.hashMapper(cdktf.anyToTerraform)(this._accountSpecificNamespaceRules),
excluded_regions: cdktf.listMapper(cdktf.stringToTerraform)(this._excludedRegions),
filter_tags: cdktf.listMapper(cdktf.stringToTerraform)(this._filterTags),
host_tags: cdktf.listMapper(cdktf.stringToTerraform)(this._hostTags),
role_name: cdktf.stringToTerraform(this._roleName),
secret_access_key: cdktf.stringToTerraform(this._secretAccessKey),
};
}
}
42 changes: 42 additions & 0 deletions src/logs-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@ import * as cdktf from 'cdktf';
// Configuration

export interface LogsIndexConfig extends cdktf.TerraformMetaArguments {
/**
* The number of log events you can send in this index per day before you are rate-limited.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/logs_index.html#daily_limit LogsIndex#daily_limit}
*/
readonly dailyLimit: string;
/**
* The name of the index.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/logs_index.html#name LogsIndex#name}
*/
readonly name: string;
/**
* The number of days before logs are deleted from this index.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/logs_index.html#retention_days LogsIndex#retention_days}
*/
readonly retentionDays: string;
/**
* exclusion_filter block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/logs_index.html#exclusion_filter LogsIndex#exclusion_filter}
Expand Down Expand Up @@ -123,7 +135,9 @@ export class LogsIndex extends cdktf.TerraformResource {
count: config.count,
lifecycle: config.lifecycle
});
this._dailyLimit = config.dailyLimit;
this._name = config.name;
this._retentionDays = config.retentionDays;
this._exclusionFilter = config.exclusionFilter;
this._filter = config.filter;
}
Expand All @@ -132,6 +146,19 @@ export class LogsIndex extends cdktf.TerraformResource {
// ATTRIBUTES
// ==========

// daily_limit - computed: false, optional: false, required: true
private _dailyLimit: string;
public get dailyLimit() {
return this.getStringAttribute('daily_limit');
}
public set dailyLimit(value: string) {
this._dailyLimit = value;
}
// Temporarily expose input value. Use with caution.
public get dailyLimitInput() {
return this._dailyLimit
}

// id - computed: true, optional: true, required: false
public get id() {
return this.getStringAttribute('id');
Expand All @@ -150,6 +177,19 @@ export class LogsIndex extends cdktf.TerraformResource {
return this._name
}

// retention_days - computed: false, optional: false, required: true
private _retentionDays: string;
public get retentionDays() {
return this.getStringAttribute('retention_days');
}
public set retentionDays(value: string) {
this._retentionDays = value;
}
// Temporarily expose input value. Use with caution.
public get retentionDaysInput() {
return this._retentionDays
}

// exclusion_filter - computed: false, optional: true, required: false
private _exclusionFilter?: LogsIndexExclusionFilter[];
public get exclusionFilter() {
Expand Down Expand Up @@ -185,7 +225,9 @@ export class LogsIndex extends cdktf.TerraformResource {

protected synthesizeAttributes(): { [name: string]: any } {
return {
daily_limit: cdktf.stringToTerraform(this._dailyLimit),
name: cdktf.stringToTerraform(this._name),
retention_days: cdktf.stringToTerraform(this._retentionDays),
exclusion_filter: cdktf.listMapper(logsIndexExclusionFilterToTerraform)(this._exclusionFilter),
filter: cdktf.listMapper(logsIndexFilterToTerraform)(this._filter),
};
Expand Down
2 changes: 1 addition & 1 deletion src/logs-metric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface LogsMetricConfig extends cdktf.TerraformMetaArguments {
}
export interface LogsMetricCompute {
/**
* The type of aggregation to use. This field can't be updated after creation.
* The type of aggregation to use. This field can't be updated after creation. Valid values are `count`, `distribution`.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/logs_metric.html#aggregation_type LogsMetric#aggregation_type}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/metric-tag-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface MetricTagConfigurationConfig extends cdktf.TerraformMetaArgumen
*/
readonly metricName: string;
/**
* The metric's type. This field can't be updated after creation. Allowed enum values: gauge,count,distribution.
* The metric's type. This field can't be updated after creation. Valid values are `gauge`, `count`, `rate`, `distribution`.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/metric_tag_configuration.html#metric_type MetricTagConfiguration#metric_type}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ We highly recommend you set this to `false` for sparse metrics, otherwise some e
*/
readonly timeoutH?: number;
/**
* The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API [documentation page](https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor). Note: The monitor type cannot be changed after a monitor is created.
* The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API [documentation page](https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor). Note: The monitor type cannot be changed after a monitor is created. Valid values are `composite`, `event alert`, `log alert`, `metric alert`, `process alert`, `query alert`, `rum alert`, `service check`, `synthetics alert`, `trace-analytics alert`, `slo alert`, `event-v2 alert`.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/monitor.html#type Monitor#type}
*/
Expand Down
4 changes: 2 additions & 2 deletions src/security-monitoring-default-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface SecurityMonitoringDefaultRuleCase {
*/
readonly notifications: string[];
/**
* Status of the rule case to match.
* Status of the rule case to match. Valid values are `info`, `low`, `medium`, `high`, `critical`.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/security_monitoring_default_rule.html#status SecurityMonitoringDefaultRule#status}
*/
Expand All @@ -51,7 +51,7 @@ function securityMonitoringDefaultRuleCaseToTerraform(struct?: SecurityMonitorin

export interface SecurityMonitoringDefaultRuleFilter {
/**
* The type of filtering action. Allowed enum values: require, suppress
* The type of filtering action. Allowed enum values: require, suppress Valid values are `require`, `suppress`.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/security_monitoring_default_rule.html#action SecurityMonitoringDefaultRule#action}
*/
Expand Down
Loading

0 comments on commit c965259

Please sign in to comment.