Skip to content

Commit

Permalink
Merge pull request #37 from hashicorp/auto/provider-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
team-tf-cdk authored Mar 14, 2022
2 parents 2162cdb + b111847 commit 0995984
Show file tree
Hide file tree
Showing 8 changed files with 6,055 additions and 2,705 deletions.
8,055 changes: 5,350 additions & 2,705 deletions API.md

Large diffs are not rendered by default.

124 changes: 124 additions & 0 deletions src/data-snowflake-database.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
// https://www.terraform.io/docs/providers/snowflake/d/database
// generated from terraform resource schema

import { Construct } from 'constructs';
import * as cdktf from 'cdktf';

// Configuration

export interface DataSnowflakeDatabaseConfig extends cdktf.TerraformMetaArguments {
/**
* The database from which to return its metadata.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/snowflake/d/database#name DataSnowflakeDatabase#name}
*/
readonly name: string;
}

/**
* Represents a {@link https://www.terraform.io/docs/providers/snowflake/d/database snowflake_database}
*/
export class DataSnowflakeDatabase extends cdktf.TerraformDataSource {

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

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

/**
* Create a new {@link https://www.terraform.io/docs/providers/snowflake/d/database snowflake_database} Data Source
*
* @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 DataSnowflakeDatabaseConfig
*/
public constructor(scope: Construct, id: string, config: DataSnowflakeDatabaseConfig) {
super(scope, id, {
terraformResourceType: 'snowflake_database',
terraformGeneratorMetadata: {
providerName: 'snowflake'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle
});
this._name = config.name;
}

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

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

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

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

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

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

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

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

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

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

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

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

protected synthesizeAttributes(): { [name: string]: any } {
return {
name: cdktf.stringToTerraform(this._name),
};
}
}
115 changes: 115 additions & 0 deletions src/data-snowflake-databases.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
// https://www.terraform.io/docs/providers/snowflake/d/databases
// generated from terraform resource schema

import { Construct } from 'constructs';
import * as cdktf from 'cdktf';

// Configuration

export interface DataSnowflakeDatabasesConfig extends cdktf.TerraformMetaArguments {
}
export class DataSnowflakeDatabasesDatabases extends cdktf.ComplexComputedList {

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

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

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

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

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

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

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

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

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

/**
* Represents a {@link https://www.terraform.io/docs/providers/snowflake/d/databases snowflake_databases}
*/
export class DataSnowflakeDatabases extends cdktf.TerraformDataSource {

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

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

/**
* Create a new {@link https://www.terraform.io/docs/providers/snowflake/d/databases snowflake_databases} Data Source
*
* @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 DataSnowflakeDatabasesConfig = {}
*/
public constructor(scope: Construct, id: string, config: DataSnowflakeDatabasesConfig = {}) {
super(scope, id, {
terraformResourceType: 'snowflake_databases',
terraformGeneratorMetadata: {
providerName: 'snowflake'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle
});
}

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

// databases - computed: true, optional: false, required: false
public databases(index: string) {
return new DataSnowflakeDatabasesDatabases(this, 'databases', index, false);
}

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

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

protected synthesizeAttributes(): { [name: string]: any } {
return {
};
}
}
24 changes: 24 additions & 0 deletions src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export interface DatabaseConfig extends cdktf.TerraformMetaArguments {
*/
readonly fromDatabase?: string;
/**
* Specify a fully-qualified path to a database to create a replica from.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/snowflake/r/database#from_replica Database#from_replica}
*/
readonly fromReplica?: string;
/**
* Specify a provider and a share in this map to create a database from a share.
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/snowflake/r/database#from_share Database#from_share}
Expand Down Expand Up @@ -114,6 +120,7 @@ export class Database extends cdktf.TerraformResource {
this._comment = config.comment;
this._dataRetentionTimeInDays = config.dataRetentionTimeInDays;
this._fromDatabase = config.fromDatabase;
this._fromReplica = config.fromReplica;
this._fromShare = config.fromShare;
this._name = config.name;
this._tag = config.tag;
Expand Down Expand Up @@ -171,6 +178,22 @@ export class Database extends cdktf.TerraformResource {
return this._fromDatabase;
}

// from_replica - computed: false, optional: true, required: false
private _fromReplica?: string;
public get fromReplica() {
return this.getStringAttribute('from_replica');
}
public set fromReplica(value: string) {
this._fromReplica = value;
}
public resetFromReplica() {
this._fromReplica = undefined;
}
// Temporarily expose input value. Use with caution.
public get fromReplicaInput() {
return this._fromReplica;
}

// from_share - computed: false, optional: true, required: false
private _fromShare?: { [key: string]: string };
public get fromShare() {
Expand Down Expand Up @@ -231,6 +254,7 @@ export class Database extends cdktf.TerraformResource {
comment: cdktf.stringToTerraform(this._comment),
data_retention_time_in_days: cdktf.numberToTerraform(this._dataRetentionTimeInDays),
from_database: cdktf.stringToTerraform(this._fromDatabase),
from_replica: cdktf.stringToTerraform(this._fromReplica),
from_share: cdktf.hashMapper(cdktf.stringToTerraform)(this._fromShare),
name: cdktf.stringToTerraform(this._name),
tag: cdktf.listMapper(databaseTagToTerraform)(this._tag),
Expand Down
Loading

0 comments on commit 0995984

Please sign in to comment.