Skip to content

Commit

Permalink
Merge pull request #4 from terraform-cdk-providers/upgrade-cdktf-0.5
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Bump cdktf dependency to 0.5
  • Loading branch information
skorfmann authored Aug 4, 2021
2 parents c965259 + 6f7c9fc commit 0b70fa9
Show file tree
Hide file tree
Showing 13 changed files with 1,691 additions and 96 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/upgrade-dependencies.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .projen/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"dependencies": [
{
"name": "@cdktf/provider-project",
"version": "^0.1.83",
"version": "^0.2.6",
"type": "build"
},
{
Expand All @@ -11,17 +11,17 @@
},
{
"name": "@types/node",
"version": "^10.17.0",
"version": "^12.19.0",
"type": "build"
},
{
"name": "cdktf-cli",
"version": "^0.4",
"version": "^0.5",
"type": "build"
},
{
"name": "cdktf",
"version": "^0.4",
"version": "^0.5",
"type": "build"
},
{
Expand Down Expand Up @@ -89,7 +89,7 @@
},
{
"name": "cdktf",
"version": "^0.4",
"version": "^0.5",
"type": "peer"
},
{
Expand Down
189 changes: 181 additions & 8 deletions API.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/data-datadog-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ export class DataDatadogMonitor extends cdktf.TerraformDataSource {
return this.getBooleanAttribute('require_full_window');
}

// restricted_roles - computed: true, optional: false, required: false
public get restrictedRoles() {
return this.getListAttribute('restricted_roles');
}

// tags - computed: true, optional: false, required: false
public get tags() {
return this.getListAttribute('tags');
Expand Down
44 changes: 44 additions & 0 deletions src/data-datadog-security-monitoring-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,37 @@ export class DataDatadogSecurityMonitoringRulesRulesCase extends cdktf.ComplexCo
return this.getStringAttribute('status');
}
}
export class DataDatadogSecurityMonitoringRulesRulesFilter extends cdktf.ComplexComputedList {

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

// query - computed: true, optional: false, required: false
public get query() {
return this.getStringAttribute('query');
}
}
export class DataDatadogSecurityMonitoringRulesRulesOptionsNewValueOptions extends cdktf.ComplexComputedList {

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

// learning_duration - computed: true, optional: false, required: false
public get learningDuration() {
return this.getNumberAttribute('learning_duration');
}
}
export class DataDatadogSecurityMonitoringRulesRulesOptions extends cdktf.ComplexComputedList {

// detection_method - computed: true, optional: false, required: false
public get detectionMethod() {
return this.getStringAttribute('detection_method');
}

// evaluation_window - computed: true, optional: false, required: false
public get evaluationWindow() {
return this.getNumberAttribute('evaluation_window');
Expand All @@ -70,6 +99,11 @@ export class DataDatadogSecurityMonitoringRulesRulesOptions extends cdktf.Comple
public get maxSignalDuration() {
return this.getNumberAttribute('max_signal_duration');
}

// new_value_options - computed: true, optional: false, required: false
public get newValueOptions() {
return this.interpolationForAttribute('new_value_options') as any;
}
}
export class DataDatadogSecurityMonitoringRulesRulesQuery extends cdktf.ComplexComputedList {

Expand Down Expand Up @@ -115,6 +149,16 @@ export class DataDatadogSecurityMonitoringRulesRules extends cdktf.ComplexComput
return this.getBooleanAttribute('enabled');
}

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

// has_extended_title - computed: true, optional: false, required: false
public get hasExtendedTitle() {
return this.getBooleanAttribute('has_extended_title');
}

// message - computed: true, optional: false, required: false
public get message() {
return this.getStringAttribute('message');
Expand Down
54 changes: 42 additions & 12 deletions src/logs-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ export interface LogsIndexConfig extends cdktf.TerraformMetaArguments {
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/logs_index.html#daily_limit LogsIndex#daily_limit}
*/
readonly dailyLimit: string;
readonly dailyLimit?: number;
/**
* If true, sets the daily_limit value to null and the index is not limited on a daily basis (any specified daily_limit value in the request is ignored). If false or omitted, the index's current daily_limit is maintained.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/logs_index.html#disable_daily_limit LogsIndex#disable_daily_limit}
*/
readonly disableDailyLimit?: boolean;
/**
* The name of the index.
*
Expand All @@ -24,7 +30,7 @@ export interface LogsIndexConfig extends cdktf.TerraformMetaArguments {
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/datadog/r/logs_index.html#retention_days LogsIndex#retention_days}
*/
readonly retentionDays: string;
readonly retentionDays?: number;
/**
* exclusion_filter block
*
Expand Down Expand Up @@ -136,6 +142,7 @@ export class LogsIndex extends cdktf.TerraformResource {
lifecycle: config.lifecycle
});
this._dailyLimit = config.dailyLimit;
this._disableDailyLimit = config.disableDailyLimit;
this._name = config.name;
this._retentionDays = config.retentionDays;
this._exclusionFilter = config.exclusionFilter;
Expand All @@ -146,19 +153,38 @@ export class LogsIndex extends cdktf.TerraformResource {
// ATTRIBUTES
// ==========

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

// disable_daily_limit - computed: true, optional: true, required: false
private _disableDailyLimit?: boolean;
public get disableDailyLimit() {
return this.getBooleanAttribute('disable_daily_limit');
}
public set disableDailyLimit(value: boolean) {
this._disableDailyLimit = value;
}
public resetDisableDailyLimit() {
this._disableDailyLimit = undefined;
}
// Temporarily expose input value. Use with caution.
public get disableDailyLimitInput() {
return this._disableDailyLimit
}

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

// retention_days - computed: false, optional: false, required: true
private _retentionDays: string;
// retention_days - computed: true, optional: true, required: false
private _retentionDays?: number;
public get retentionDays() {
return this.getStringAttribute('retention_days');
return this.getNumberAttribute('retention_days');
}
public set retentionDays(value: string) {
public set retentionDays(value: number) {
this._retentionDays = value;
}
public resetRetentionDays() {
this._retentionDays = undefined;
}
// Temporarily expose input value. Use with caution.
public get retentionDaysInput() {
return this._retentionDays
Expand Down Expand Up @@ -225,9 +254,10 @@ export class LogsIndex extends cdktf.TerraformResource {

protected synthesizeAttributes(): { [name: string]: any } {
return {
daily_limit: cdktf.stringToTerraform(this._dailyLimit),
daily_limit: cdktf.numberToTerraform(this._dailyLimit),
disable_daily_limit: cdktf.booleanToTerraform(this._disableDailyLimit),
name: cdktf.stringToTerraform(this._name),
retention_days: cdktf.stringToTerraform(this._retentionDays),
retention_days: cdktf.numberToTerraform(this._retentionDays),
exclusion_filter: cdktf.listMapper(logsIndexExclusionFilterToTerraform)(this._exclusionFilter),
filter: cdktf.listMapper(logsIndexFilterToTerraform)(this._filter),
};
Expand Down
Loading

0 comments on commit 0b70fa9

Please sign in to comment.