Skip to content

Commit

Permalink
Merge pull request #21 from hashicorp/auto/provider-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
team-tf-cdk authored Nov 4, 2021
2 parents df3900e + 8a85ae7 commit f45eb33
Show file tree
Hide file tree
Showing 17 changed files with 7,207 additions and 1,790 deletions.
4,012 changes: 3,627 additions & 385 deletions API.md

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions src/aws/APIGateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4893,6 +4893,33 @@ export namespace APIGateway {
*/
readonly throttleSettings?: ApiGatewayUsagePlanThrottleSettings;
}
export interface ApiGatewayUsagePlanApiStagesThrottle {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_usage_plan.html#burst_limit ApiGatewayUsagePlan#burst_limit}
*/
readonly burstLimit?: number;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_usage_plan.html#path ApiGatewayUsagePlan#path}
*/
readonly path: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_usage_plan.html#rate_limit ApiGatewayUsagePlan#rate_limit}
*/
readonly rateLimit?: number;
}

function apiGatewayUsagePlanApiStagesThrottleToTerraform(struct?: ApiGatewayUsagePlanApiStagesThrottle): any {
if (!cdktf.canInspect(struct)) { return struct; }
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
burst_limit: cdktf.numberToTerraform(struct!.burstLimit),
path: cdktf.stringToTerraform(struct!.path),
rate_limit: cdktf.numberToTerraform(struct!.rateLimit),
}
}

export interface ApiGatewayUsagePlanApiStages {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_usage_plan.html#api_id ApiGatewayUsagePlan#api_id}
Expand All @@ -4902,6 +4929,12 @@ export namespace APIGateway {
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_usage_plan.html#stage ApiGatewayUsagePlan#stage}
*/
readonly stage: string;
/**
* throttle block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/api_gateway_usage_plan.html#throttle ApiGatewayUsagePlan#throttle}
*/
readonly throttle?: ApiGatewayUsagePlanApiStagesThrottle[];
}

function apiGatewayUsagePlanApiStagesToTerraform(struct?: ApiGatewayUsagePlanApiStages): any {
Expand All @@ -4912,6 +4945,7 @@ export namespace APIGateway {
return {
api_id: cdktf.stringToTerraform(struct!.apiId),
stage: cdktf.stringToTerraform(struct!.stage),
throttle: cdktf.listMapper(apiGatewayUsagePlanApiStagesThrottleToTerraform)(struct!.throttle),
}
}

Expand Down
43 changes: 43 additions & 0 deletions src/aws/AutoScaling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,14 @@ export namespace AutoScaling {
}

export interface AutoscalingGroupInstanceRefreshPreferences {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#checkpoint_delay AutoscalingGroup#checkpoint_delay}
*/
readonly checkpointDelay?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#checkpoint_percentages AutoscalingGroup#checkpoint_percentages}
*/
readonly checkpointPercentages?: number[];
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#instance_warmup AutoscalingGroup#instance_warmup}
*/
Expand All @@ -345,6 +353,8 @@ export namespace AutoScaling {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
checkpoint_delay: cdktf.stringToTerraform(struct!.checkpointDelay),
checkpoint_percentages: cdktf.listMapper(cdktf.numberToTerraform)(struct!.checkpointPercentages),
instance_warmup: cdktf.stringToTerraform(struct!.instanceWarmup),
min_healthy_percentage: cdktf.numberToTerraform(struct!.minHealthyPercentage),
}
Expand All @@ -360,6 +370,39 @@ export namespace AutoScaling {
super(terraformResource, terraformAttribute, isSingleItem);
}

// checkpoint_delay - computed: false, optional: true, required: false
private _checkpointDelay?: string | undefined;
public get checkpointDelay() {
return this.getStringAttribute('checkpoint_delay');
}
public set checkpointDelay(value: string | undefined) {
this._checkpointDelay = value;
}
public resetCheckpointDelay() {
this._checkpointDelay = undefined;
}
// Temporarily expose input value. Use with caution.
public get checkpointDelayInput() {
return this._checkpointDelay
}

// checkpoint_percentages - computed: false, optional: true, required: false
private _checkpointPercentages?: number[] | undefined;
public get checkpointPercentages() {
// Getting the computed value is not yet implemented
return this.interpolationForAttribute('checkpoint_percentages') as any;
}
public set checkpointPercentages(value: number[] | undefined) {
this._checkpointPercentages = value;
}
public resetCheckpointPercentages() {
this._checkpointPercentages = undefined;
}
// Temporarily expose input value. Use with caution.
public get checkpointPercentagesInput() {
return this._checkpointPercentages
}

// instance_warmup - computed: false, optional: true, required: false
private _instanceWarmup?: string | undefined;
public get instanceWarmup() {
Expand Down
145 changes: 145 additions & 0 deletions src/aws/Backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,151 @@ export namespace Backup {
};
}
}
export interface BackupVaultLockConfigurationConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/backup_vault_lock_configuration.html#backup_vault_name BackupVaultLockConfiguration#backup_vault_name}
*/
readonly backupVaultName: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/backup_vault_lock_configuration.html#changeable_for_days BackupVaultLockConfiguration#changeable_for_days}
*/
readonly changeableForDays?: number;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/backup_vault_lock_configuration.html#max_retention_days BackupVaultLockConfiguration#max_retention_days}
*/
readonly maxRetentionDays?: number;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/backup_vault_lock_configuration.html#min_retention_days BackupVaultLockConfiguration#min_retention_days}
*/
readonly minRetentionDays?: number;
}

/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/backup_vault_lock_configuration.html aws_backup_vault_lock_configuration}
*/
export class BackupVaultLockConfiguration extends cdktf.TerraformResource {

// =================
// STATIC PROPERTIES
// =================
public static readonly tfResourceType: string = "aws_backup_vault_lock_configuration";

// ===========
// INITIALIZER
// ===========

/**
* Create a new {@link https://www.terraform.io/docs/providers/aws/r/backup_vault_lock_configuration.html aws_backup_vault_lock_configuration} Resource
*
* @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 BackupVaultLockConfigurationConfig
*/
public constructor(scope: Construct, id: string, config: BackupVaultLockConfigurationConfig) {
super(scope, id, {
terraformResourceType: 'aws_backup_vault_lock_configuration',
terraformGeneratorMetadata: {
providerName: 'aws'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle
});
this._backupVaultName = config.backupVaultName;
this._changeableForDays = config.changeableForDays;
this._maxRetentionDays = config.maxRetentionDays;
this._minRetentionDays = config.minRetentionDays;
}

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

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

// backup_vault_name - computed: false, optional: false, required: true
private _backupVaultName?: string;
public get backupVaultName() {
return this.getStringAttribute('backup_vault_name');
}
public set backupVaultName(value: string) {
this._backupVaultName = value;
}
// Temporarily expose input value. Use with caution.
public get backupVaultNameInput() {
return this._backupVaultName
}

// changeable_for_days - computed: false, optional: true, required: false
private _changeableForDays?: number | undefined;
public get changeableForDays() {
return this.getNumberAttribute('changeable_for_days');
}
public set changeableForDays(value: number | undefined) {
this._changeableForDays = value;
}
public resetChangeableForDays() {
this._changeableForDays = undefined;
}
// Temporarily expose input value. Use with caution.
public get changeableForDaysInput() {
return this._changeableForDays
}

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

// max_retention_days - computed: false, optional: true, required: false
private _maxRetentionDays?: number | undefined;
public get maxRetentionDays() {
return this.getNumberAttribute('max_retention_days');
}
public set maxRetentionDays(value: number | undefined) {
this._maxRetentionDays = value;
}
public resetMaxRetentionDays() {
this._maxRetentionDays = undefined;
}
// Temporarily expose input value. Use with caution.
public get maxRetentionDaysInput() {
return this._maxRetentionDays
}

// min_retention_days - computed: false, optional: true, required: false
private _minRetentionDays?: number | undefined;
public get minRetentionDays() {
return this.getNumberAttribute('min_retention_days');
}
public set minRetentionDays(value: number | undefined) {
this._minRetentionDays = value;
}
public resetMinRetentionDays() {
this._minRetentionDays = undefined;
}
// Temporarily expose input value. Use with caution.
public get minRetentionDaysInput() {
return this._minRetentionDays
}

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

protected synthesizeAttributes(): { [name: string]: any } {
return {
backup_vault_name: cdktf.stringToTerraform(this._backupVaultName),
changeable_for_days: cdktf.numberToTerraform(this._changeableForDays),
max_retention_days: cdktf.numberToTerraform(this._maxRetentionDays),
min_retention_days: cdktf.numberToTerraform(this._minRetentionDays),
};
}
}
export interface BackupVaultNotificationsConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/backup_vault_notifications.html#backup_vault_events BackupVaultNotifications#backup_vault_events}
Expand Down
88 changes: 88 additions & 0 deletions src/aws/Batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,70 @@ export namespace Batch {
*/
readonly computeResources?: BatchComputeEnvironmentComputeResources;
}
export interface BatchComputeEnvironmentComputeResourcesEc2Configuration {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/batch_compute_environment.html#image_id_override BatchComputeEnvironment#image_id_override}
*/
readonly imageIdOverride?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/batch_compute_environment.html#image_type BatchComputeEnvironment#image_type}
*/
readonly imageType?: string;
}

function batchComputeEnvironmentComputeResourcesEc2ConfigurationToTerraform(struct?: BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference | BatchComputeEnvironmentComputeResourcesEc2Configuration): any {
if (!cdktf.canInspect(struct)) { return struct; }
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
image_id_override: cdktf.stringToTerraform(struct!.imageIdOverride),
image_type: cdktf.stringToTerraform(struct!.imageType),
}
}

export class BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param isSingleItem True if this is a block, false if it's a list
*/
public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) {
super(terraformResource, terraformAttribute, isSingleItem);
}

// image_id_override - computed: true, optional: true, required: false
private _imageIdOverride?: string | undefined;
public get imageIdOverride() {
return this.getStringAttribute('image_id_override');
}
public set imageIdOverride(value: string | undefined) {
this._imageIdOverride = value;
}
public resetImageIdOverride() {
this._imageIdOverride = undefined;
}
// Temporarily expose input value. Use with caution.
public get imageIdOverrideInput() {
return this._imageIdOverride
}

// image_type - computed: false, optional: true, required: false
private _imageType?: string | undefined;
public get imageType() {
return this.getStringAttribute('image_type');
}
public set imageType(value: string | undefined) {
this._imageType = value;
}
public resetImageType() {
this._imageType = undefined;
}
// Temporarily expose input value. Use with caution.
public get imageTypeInput() {
return this._imageType
}
}
export interface BatchComputeEnvironmentComputeResourcesLaunchTemplate {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/batch_compute_environment.html#launch_template_id BatchComputeEnvironment#launch_template_id}
Expand Down Expand Up @@ -186,6 +250,12 @@ export namespace Batch {
*/
readonly type: string;
/**
* ec2_configuration block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/batch_compute_environment.html#ec2_configuration BatchComputeEnvironment#ec2_configuration}
*/
readonly ec2Configuration?: BatchComputeEnvironmentComputeResourcesEc2Configuration;
/**
* launch_template block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/batch_compute_environment.html#launch_template BatchComputeEnvironment#launch_template}
Expand Down Expand Up @@ -213,6 +283,7 @@ export namespace Batch {
subnets: cdktf.listMapper(cdktf.stringToTerraform)(struct!.subnets),
tags: cdktf.hashMapper(cdktf.anyToTerraform)(struct!.tags),
type: cdktf.stringToTerraform(struct!.type),
ec2_configuration: batchComputeEnvironmentComputeResourcesEc2ConfigurationToTerraform(struct!.ec2Configuration),
launch_template: batchComputeEnvironmentComputeResourcesLaunchTemplateToTerraform(struct!.launchTemplate),
}
}
Expand Down Expand Up @@ -440,6 +511,23 @@ export namespace Batch {
return this._type
}

// ec2_configuration - computed: false, optional: true, required: false
private _ec2Configuration?: BatchComputeEnvironmentComputeResourcesEc2Configuration | undefined;
private __ec2ConfigurationOutput = new BatchComputeEnvironmentComputeResourcesEc2ConfigurationOutputReference(this as any, "ec2_configuration", true);
public get ec2Configuration() {
return this.__ec2ConfigurationOutput;
}
public putEc2Configuration(value: BatchComputeEnvironmentComputeResourcesEc2Configuration | undefined) {
this._ec2Configuration = value;
}
public resetEc2Configuration() {
this._ec2Configuration = undefined;
}
// Temporarily expose input value. Use with caution.
public get ec2ConfigurationInput() {
return this._ec2Configuration
}

// launch_template - computed: false, optional: true, required: false
private _launchTemplate?: BatchComputeEnvironmentComputeResourcesLaunchTemplate | undefined;
private __launchTemplateOutput = new BatchComputeEnvironmentComputeResourcesLaunchTemplateOutputReference(this as any, "launch_template", true);
Expand Down
Loading

0 comments on commit f45eb33

Please sign in to comment.