diff --git a/provider/cmd/pulumi-resource-dbtcloud/bridge-metadata.json b/provider/cmd/pulumi-resource-dbtcloud/bridge-metadata.json index e82c04f..222e87e 100644 --- a/provider/cmd/pulumi-resource-dbtcloud/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-dbtcloud/bridge-metadata.json @@ -1,6 +1,9 @@ { "auto-aliasing": { "resources": { + "dbtcloud_account_features": { + "current": "dbtcloud:index/accountFeatures:AccountFeatures" + }, "dbtcloud_bigquery_connection": { "current": "dbtcloud:index/bigQueryConnection:BigQueryConnection" }, @@ -79,6 +82,14 @@ } } }, + "dbtcloud_ip_restrictions_rule": { + "current": "dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule", + "fields": { + "cidrs": { + "maxItemsOne": false + } + } + }, "dbtcloud_job": { "current": "dbtcloud:index/job:Job", "fields": { @@ -428,6 +439,7 @@ "auto-settings": {}, "mux": { "resources": { + "dbtcloud:index/accountFeatures:AccountFeatures": 1, "dbtcloud:index/bigQueryConnection:BigQueryConnection": 0, "dbtcloud:index/bigQueryCredential:BigQueryCredential": 0, "dbtcloud:index/connection:Connection": 0, @@ -441,6 +453,7 @@ "dbtcloud:index/globalConnection:GlobalConnection": 1, "dbtcloud:index/group:Group": 1, "dbtcloud:index/groupPartialPermissions:GroupPartialPermissions": 1, + "dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule": 1, "dbtcloud:index/job:Job": 0, "dbtcloud:index/licenseMap:LicenseMap": 0, "dbtcloud:index/lineageIntegration:LineageIntegration": 1, diff --git a/provider/cmd/pulumi-resource-dbtcloud/schema.json b/provider/cmd/pulumi-resource-dbtcloud/schema.json index f20ccc0..1da39d9 100644 --- a/provider/cmd/pulumi-resource-dbtcloud/schema.json +++ b/provider/cmd/pulumi-resource-dbtcloud/schema.json @@ -762,6 +762,37 @@ "permissionSet" ] }, + "dbtcloud:index/IpRestrictionsRuleCidr:IpRestrictionsRuleCidr": { + "properties": { + "cidr": { + "type": "string", + "description": "IP CIDR range (can be IPv4 or IPv6)\n" + }, + "cidrIpv6": { + "type": "string", + "description": "IPv6 CIDR range (read-only)\n" + }, + "id": { + "type": "integer", + "description": "ID of the CIDR range\n" + }, + "ipRestrictionRuleId": { + "type": "integer", + "description": "ID of the IP restriction rule\n" + } + }, + "type": "object", + "language": { + "nodejs": { + "requiredOutputs": [ + "cidr", + "cidrIpv6", + "id", + "ipRestrictionRuleId" + ] + } + } + }, "dbtcloud:index/JobJobCompletionTriggerCondition:JobJobCompletionTriggerCondition": { "properties": { "jobId": { @@ -2140,6 +2171,60 @@ } }, "resources": { + "dbtcloud:index/accountFeatures:AccountFeatures": { + "description": "Manages dbt Cloud global features at the account level, like Advanced CI. The same feature should not be configured in different resources to avoid conflicts.\n\nWhen destroying the resource or removing the value for an attribute, the features status will not be changed. Deactivating features will require applying them wih the value set to `false`.\n", + "properties": { + "advancedCi": { + "type": "boolean", + "description": "Whether advanced CI is enabled.\n" + }, + "partialParsing": { + "type": "boolean", + "description": "Whether partial parsing is enabled.\n" + }, + "repoCaching": { + "type": "boolean", + "description": "Whether repository caching is enabled.\n" + } + }, + "required": [ + "advancedCi", + "partialParsing", + "repoCaching" + ], + "inputProperties": { + "advancedCi": { + "type": "boolean", + "description": "Whether advanced CI is enabled.\n" + }, + "partialParsing": { + "type": "boolean", + "description": "Whether partial parsing is enabled.\n" + }, + "repoCaching": { + "type": "boolean", + "description": "Whether repository caching is enabled.\n" + } + }, + "stateInputs": { + "description": "Input properties used for looking up and filtering AccountFeatures resources.\n", + "properties": { + "advancedCi": { + "type": "boolean", + "description": "Whether advanced CI is enabled.\n" + }, + "partialParsing": { + "type": "boolean", + "description": "Whether partial parsing is enabled.\n" + }, + "repoCaching": { + "type": "boolean", + "description": "Whether repository caching is enabled.\n" + } + }, + "type": "object" + } + }, "dbtcloud:index/bigQueryConnection:BigQueryConnection": { "description": "Resource to create BigQuery connections in dbt Cloud. Can be set to use OAuth for developers.\n\n\u003e This resource is deprecated and is going to be removed in the next major release, please use the `dbtcloud.GlobalConnection` resource instead to create BigQuery connections.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dbtcloud from \"@pulumi/dbtcloud\";\n\nconst myConnection = new dbtcloud.BigQueryConnection(\"my_connection\", {\n projectId: dbtProject.id,\n name: \"Project Name\",\n type: \"bigquery\",\n isActive: true,\n gcpProjectId: \"my-gcp-project-id\",\n timeoutSeconds: 100,\n privateKeyId: \"my-private-key-id\",\n privateKey: \"ABCDEFGHIJKL\",\n clientEmail: \"my_client_email\",\n clientId: \"my_client_di\",\n authUri: \"my_auth_uri\",\n tokenUri: \"my_token_uri\",\n authProviderX509CertUrl: \"my_auth_provider_x509_cert_url\",\n clientX509CertUrl: \"my_client_x509_cert_url\",\n retries: 3,\n});\n// it is also possible to set the connection to use OAuth by filling in `application_id` and `application_secret`\nconst myConnectionWithOauth = new dbtcloud.BigQueryConnection(\"my_connection_with_oauth\", {\n projectId: dbtProject.id,\n name: \"Project Name\",\n type: \"bigquery\",\n isActive: true,\n gcpProjectId: \"my-gcp-project-id\",\n timeoutSeconds: 100,\n privateKeyId: \"my-private-key-id\",\n privateKey: \"ABCDEFGHIJKL\",\n clientEmail: \"my_client_email\",\n clientId: \"my_client_di\",\n authUri: \"my_auth_uri\",\n tokenUri: \"my_token_uri\",\n authProviderX509CertUrl: \"my_auth_provider_x509_cert_url\",\n clientX509CertUrl: \"my_client_x509_cert_url\",\n retries: 3,\n applicationId: \"oauth_application_id\",\n applicationSecret: \"oauth_secret_id\",\n});\n```\n```python\nimport pulumi\nimport pulumi_dbtcloud as dbtcloud\n\nmy_connection = dbtcloud.BigQueryConnection(\"my_connection\",\n project_id=dbt_project[\"id\"],\n name=\"Project Name\",\n type=\"bigquery\",\n is_active=True,\n gcp_project_id=\"my-gcp-project-id\",\n timeout_seconds=100,\n private_key_id=\"my-private-key-id\",\n private_key=\"ABCDEFGHIJKL\",\n client_email=\"my_client_email\",\n client_id=\"my_client_di\",\n auth_uri=\"my_auth_uri\",\n token_uri=\"my_token_uri\",\n auth_provider_x509_cert_url=\"my_auth_provider_x509_cert_url\",\n client_x509_cert_url=\"my_client_x509_cert_url\",\n retries=3)\n# it is also possible to set the connection to use OAuth by filling in `application_id` and `application_secret`\nmy_connection_with_oauth = dbtcloud.BigQueryConnection(\"my_connection_with_oauth\",\n project_id=dbt_project[\"id\"],\n name=\"Project Name\",\n type=\"bigquery\",\n is_active=True,\n gcp_project_id=\"my-gcp-project-id\",\n timeout_seconds=100,\n private_key_id=\"my-private-key-id\",\n private_key=\"ABCDEFGHIJKL\",\n client_email=\"my_client_email\",\n client_id=\"my_client_di\",\n auth_uri=\"my_auth_uri\",\n token_uri=\"my_token_uri\",\n auth_provider_x509_cert_url=\"my_auth_provider_x509_cert_url\",\n client_x509_cert_url=\"my_client_x509_cert_url\",\n retries=3,\n application_id=\"oauth_application_id\",\n application_secret=\"oauth_secret_id\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DbtCloud = Pulumi.DbtCloud;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var myConnection = new DbtCloud.BigQueryConnection(\"my_connection\", new()\n {\n ProjectId = dbtProject.Id,\n Name = \"Project Name\",\n Type = \"bigquery\",\n IsActive = true,\n GcpProjectId = \"my-gcp-project-id\",\n TimeoutSeconds = 100,\n PrivateKeyId = \"my-private-key-id\",\n PrivateKey = \"ABCDEFGHIJKL\",\n ClientEmail = \"my_client_email\",\n ClientId = \"my_client_di\",\n AuthUri = \"my_auth_uri\",\n TokenUri = \"my_token_uri\",\n AuthProviderX509CertUrl = \"my_auth_provider_x509_cert_url\",\n ClientX509CertUrl = \"my_client_x509_cert_url\",\n Retries = 3,\n });\n\n // it is also possible to set the connection to use OAuth by filling in `application_id` and `application_secret`\n var myConnectionWithOauth = new DbtCloud.BigQueryConnection(\"my_connection_with_oauth\", new()\n {\n ProjectId = dbtProject.Id,\n Name = \"Project Name\",\n Type = \"bigquery\",\n IsActive = true,\n GcpProjectId = \"my-gcp-project-id\",\n TimeoutSeconds = 100,\n PrivateKeyId = \"my-private-key-id\",\n PrivateKey = \"ABCDEFGHIJKL\",\n ClientEmail = \"my_client_email\",\n ClientId = \"my_client_di\",\n AuthUri = \"my_auth_uri\",\n TokenUri = \"my_token_uri\",\n AuthProviderX509CertUrl = \"my_auth_provider_x509_cert_url\",\n ClientX509CertUrl = \"my_client_x509_cert_url\",\n Retries = 3,\n ApplicationId = \"oauth_application_id\",\n ApplicationSecret = \"oauth_secret_id\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dbtcloud.NewBigQueryConnection(ctx, \"my_connection\", \u0026dbtcloud.BigQueryConnectionArgs{\n\t\t\tProjectId: pulumi.Any(dbtProject.Id),\n\t\t\tName: pulumi.String(\"Project Name\"),\n\t\t\tType: pulumi.String(\"bigquery\"),\n\t\t\tIsActive: pulumi.Bool(true),\n\t\t\tGcpProjectId: pulumi.String(\"my-gcp-project-id\"),\n\t\t\tTimeoutSeconds: pulumi.Int(100),\n\t\t\tPrivateKeyId: pulumi.String(\"my-private-key-id\"),\n\t\t\tPrivateKey: pulumi.String(\"ABCDEFGHIJKL\"),\n\t\t\tClientEmail: pulumi.String(\"my_client_email\"),\n\t\t\tClientId: pulumi.String(\"my_client_di\"),\n\t\t\tAuthUri: pulumi.String(\"my_auth_uri\"),\n\t\t\tTokenUri: pulumi.String(\"my_token_uri\"),\n\t\t\tAuthProviderX509CertUrl: pulumi.String(\"my_auth_provider_x509_cert_url\"),\n\t\t\tClientX509CertUrl: pulumi.String(\"my_client_x509_cert_url\"),\n\t\t\tRetries: pulumi.Int(3),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// it is also possible to set the connection to use OAuth by filling in `application_id` and `application_secret`\n\t\t_, err = dbtcloud.NewBigQueryConnection(ctx, \"my_connection_with_oauth\", \u0026dbtcloud.BigQueryConnectionArgs{\n\t\t\tProjectId: pulumi.Any(dbtProject.Id),\n\t\t\tName: pulumi.String(\"Project Name\"),\n\t\t\tType: pulumi.String(\"bigquery\"),\n\t\t\tIsActive: pulumi.Bool(true),\n\t\t\tGcpProjectId: pulumi.String(\"my-gcp-project-id\"),\n\t\t\tTimeoutSeconds: pulumi.Int(100),\n\t\t\tPrivateKeyId: pulumi.String(\"my-private-key-id\"),\n\t\t\tPrivateKey: pulumi.String(\"ABCDEFGHIJKL\"),\n\t\t\tClientEmail: pulumi.String(\"my_client_email\"),\n\t\t\tClientId: pulumi.String(\"my_client_di\"),\n\t\t\tAuthUri: pulumi.String(\"my_auth_uri\"),\n\t\t\tTokenUri: pulumi.String(\"my_token_uri\"),\n\t\t\tAuthProviderX509CertUrl: pulumi.String(\"my_auth_provider_x509_cert_url\"),\n\t\t\tClientX509CertUrl: pulumi.String(\"my_client_x509_cert_url\"),\n\t\t\tRetries: pulumi.Int(3),\n\t\t\tApplicationId: pulumi.String(\"oauth_application_id\"),\n\t\t\tApplicationSecret: pulumi.String(\"oauth_secret_id\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dbtcloud.BigQueryConnection;\nimport com.pulumi.dbtcloud.BigQueryConnectionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var myConnection = new BigQueryConnection(\"myConnection\", BigQueryConnectionArgs.builder()\n .projectId(dbtProject.id())\n .name(\"Project Name\")\n .type(\"bigquery\")\n .isActive(true)\n .gcpProjectId(\"my-gcp-project-id\")\n .timeoutSeconds(100)\n .privateKeyId(\"my-private-key-id\")\n .privateKey(\"ABCDEFGHIJKL\")\n .clientEmail(\"my_client_email\")\n .clientId(\"my_client_di\")\n .authUri(\"my_auth_uri\")\n .tokenUri(\"my_token_uri\")\n .authProviderX509CertUrl(\"my_auth_provider_x509_cert_url\")\n .clientX509CertUrl(\"my_client_x509_cert_url\")\n .retries(3)\n .build());\n\n // it is also possible to set the connection to use OAuth by filling in `application_id` and `application_secret`\n var myConnectionWithOauth = new BigQueryConnection(\"myConnectionWithOauth\", BigQueryConnectionArgs.builder()\n .projectId(dbtProject.id())\n .name(\"Project Name\")\n .type(\"bigquery\")\n .isActive(true)\n .gcpProjectId(\"my-gcp-project-id\")\n .timeoutSeconds(100)\n .privateKeyId(\"my-private-key-id\")\n .privateKey(\"ABCDEFGHIJKL\")\n .clientEmail(\"my_client_email\")\n .clientId(\"my_client_di\")\n .authUri(\"my_auth_uri\")\n .tokenUri(\"my_token_uri\")\n .authProviderX509CertUrl(\"my_auth_provider_x509_cert_url\")\n .clientX509CertUrl(\"my_client_x509_cert_url\")\n .retries(3)\n .applicationId(\"oauth_application_id\")\n .applicationSecret(\"oauth_secret_id\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n myConnection:\n type: dbtcloud:BigQueryConnection\n name: my_connection\n properties:\n projectId: ${dbtProject.id}\n name: Project Name\n type: bigquery\n isActive: true\n gcpProjectId: my-gcp-project-id\n timeoutSeconds: 100\n privateKeyId: my-private-key-id\n privateKey: ABCDEFGHIJKL\n clientEmail: my_client_email\n clientId: my_client_di\n authUri: my_auth_uri\n tokenUri: my_token_uri\n authProviderX509CertUrl: my_auth_provider_x509_cert_url\n clientX509CertUrl: my_client_x509_cert_url\n retries: 3\n # it is also possible to set the connection to use OAuth by filling in `application_id` and `application_secret`\n myConnectionWithOauth:\n type: dbtcloud:BigQueryConnection\n name: my_connection_with_oauth\n properties:\n projectId: ${dbtProject.id}\n name: Project Name\n type: bigquery\n isActive: true\n gcpProjectId: my-gcp-project-id\n timeoutSeconds: 100\n privateKeyId: my-private-key-id\n privateKey: ABCDEFGHIJKL\n clientEmail: my_client_email\n clientId: my_client_di\n authUri: my_auth_uri\n tokenUri: my_token_uri\n authProviderX509CertUrl: my_auth_provider_x509_cert_url\n clientX509CertUrl: my_client_x509_cert_url\n retries: 3\n applicationId: oauth_application_id\n applicationSecret: oauth_secret_id\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nusing import blocks (requires Terraform \u003e= 1.5)\n\nimport {\n\n to = dbtcloud_bigquery_connection.my_connection\n\n id = \"project_id:connection_id\"\n\n}\n\nimport {\n\n to = dbtcloud_bigquery_connection.my_connection\n\n id = \"12345:6789\"\n\n}\n\nusing the older import command\n\n```sh\n$ pulumi import dbtcloud:index/bigQueryConnection:BigQueryConnection my_connection \"project_id:connection_id\"\n```\n\n```sh\n$ pulumi import dbtcloud:index/bigQueryConnection:BigQueryConnection my_connection 12345:6789\n```\n\n", "properties": { @@ -4023,6 +4108,99 @@ "type": "object" } }, + "dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule": { + "description": "Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dbtcloud from \"@pulumi/dbtcloud\";\n\nconst test = new dbtcloud.IpRestrictionsRule(\"test\", {\n name: \"My restriction rule\",\n description: \"Important description\",\n cidrs: [\n {\n cidr: \"::ffff:106:708\",\n },\n {\n cidr: \"1.6.7.10/24\",\n },\n ],\n type: \"deny\",\n ruleSetEnabled: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_dbtcloud as dbtcloud\n\ntest = dbtcloud.IpRestrictionsRule(\"test\",\n name=\"My restriction rule\",\n description=\"Important description\",\n cidrs=[\n {\n \"cidr\": \"::ffff:106:708\",\n },\n {\n \"cidr\": \"1.6.7.10/24\",\n },\n ],\n type=\"deny\",\n rule_set_enabled=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DbtCloud = Pulumi.DbtCloud;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new DbtCloud.IpRestrictionsRule(\"test\", new()\n {\n Name = \"My restriction rule\",\n Description = \"Important description\",\n Cidrs = new[]\n {\n new DbtCloud.Inputs.IpRestrictionsRuleCidrArgs\n {\n Cidr = \"::ffff:106:708\",\n },\n new DbtCloud.Inputs.IpRestrictionsRuleCidrArgs\n {\n Cidr = \"1.6.7.10/24\",\n },\n },\n Type = \"deny\",\n RuleSetEnabled = false,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dbtcloud.NewIpRestrictionsRule(ctx, \"test\", \u0026dbtcloud.IpRestrictionsRuleArgs{\n\t\t\tName: pulumi.String(\"My restriction rule\"),\n\t\t\tDescription: pulumi.String(\"Important description\"),\n\t\t\tCidrs: dbtcloud.IpRestrictionsRuleCidrArray{\n\t\t\t\t\u0026dbtcloud.IpRestrictionsRuleCidrArgs{\n\t\t\t\t\tCidr: pulumi.String(\"::ffff:106:708\"),\n\t\t\t\t},\n\t\t\t\t\u0026dbtcloud.IpRestrictionsRuleCidrArgs{\n\t\t\t\t\tCidr: pulumi.String(\"1.6.7.10/24\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tType: pulumi.String(\"deny\"),\n\t\t\tRuleSetEnabled: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dbtcloud.IpRestrictionsRule;\nimport com.pulumi.dbtcloud.IpRestrictionsRuleArgs;\nimport com.pulumi.dbtcloud.inputs.IpRestrictionsRuleCidrArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new IpRestrictionsRule(\"test\", IpRestrictionsRuleArgs.builder()\n .name(\"My restriction rule\")\n .description(\"Important description\")\n .cidrs( \n IpRestrictionsRuleCidrArgs.builder()\n .cidr(\"::ffff:106:708\")\n .build(),\n IpRestrictionsRuleCidrArgs.builder()\n .cidr(\"1.6.7.10/24\")\n .build())\n .type(\"deny\")\n .ruleSetEnabled(false)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: dbtcloud:IpRestrictionsRule\n properties:\n name: My restriction rule\n description: Important description\n cidrs:\n - cidr: ::ffff:106:708\n - cidr: 1.6.7.10/24\n type: deny\n ruleSetEnabled: false\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nusing import blocks (requires Terraform \u003e= 1.5)\n\nimport {\n\n to = dbtcloud_ip_restrictions_rule.my_rule\n\n id = \"ip_restriction_rule_id\"\n\n}\n\nimport {\n\n to = dbtcloud_ip_restrictions_rule.my_rule\n\n id = \"12345\"\n\n}\n\nusing the older import command\n\n```sh\n$ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule \"ip_restriction_rule_id\"\n```\n\n```sh\n$ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule 12345\n```\n\n", + "properties": { + "cidrs": { + "type": "array", + "items": { + "$ref": "#/types/dbtcloud:index/IpRestrictionsRuleCidr:IpRestrictionsRuleCidr" + }, + "description": "Set of CIDR ranges for this rule\n" + }, + "description": { + "type": "string", + "description": "A description of the IP restriction rule\n" + }, + "name": { + "type": "string", + "description": "The name of the IP restriction rule\n" + }, + "ruleSetEnabled": { + "type": "boolean", + "description": "Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time.\n" + }, + "type": { + "type": "string", + "description": "The type of the IP restriction rule (allow or deny)\n" + } + }, + "required": [ + "cidrs", + "name", + "ruleSetEnabled", + "type" + ], + "inputProperties": { + "cidrs": { + "type": "array", + "items": { + "$ref": "#/types/dbtcloud:index/IpRestrictionsRuleCidr:IpRestrictionsRuleCidr" + }, + "description": "Set of CIDR ranges for this rule\n" + }, + "description": { + "type": "string", + "description": "A description of the IP restriction rule\n" + }, + "name": { + "type": "string", + "description": "The name of the IP restriction rule\n" + }, + "ruleSetEnabled": { + "type": "boolean", + "description": "Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time.\n" + }, + "type": { + "type": "string", + "description": "The type of the IP restriction rule (allow or deny)\n" + } + }, + "requiredInputs": [ + "cidrs", + "ruleSetEnabled", + "type" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering IpRestrictionsRule resources.\n", + "properties": { + "cidrs": { + "type": "array", + "items": { + "$ref": "#/types/dbtcloud:index/IpRestrictionsRuleCidr:IpRestrictionsRuleCidr" + }, + "description": "Set of CIDR ranges for this rule\n" + }, + "description": { + "type": "string", + "description": "A description of the IP restriction rule\n" + }, + "name": { + "type": "string", + "description": "The name of the IP restriction rule\n" + }, + "ruleSetEnabled": { + "type": "boolean", + "description": "Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time.\n" + }, + "type": { + "type": "string", + "description": "The type of the IP restriction rule (allow or deny)\n" + } + }, + "type": "object" + } + }, "dbtcloud:index/job:Job": { "description": "\u003e In October 2023, CI improvements have been rolled out to dbt Cloud with minor impacts to some jobs: [more info](https://docs.getdbt.com/docs/dbt-versions/release-notes/june-2023/ci-updates-phase1-rn). \n\u003cbr/\u003e\n\u003cbr/\u003e\nThose improvements include modifications to deferral which was historically set at the job level and will now be set at the environment level. \nDeferral can still be set to \"self\" by setting `self_deferring` to `true` but with the new approach, deferral to other runs need to be done with `deferring_environment_id` instead of `deferring_job_id`.\n\n\u003e New with 0.3.1, `triggers` now accepts a `on_merge` value to trigger jobs when code is merged in git. If `on_merge` is `true` all other triggers need to be `false`.\n\u003cbr/\u003e\n\u003cbr/\u003e\nFor now, it is not a mandatory field, but it will be in a future version. Please add `on_merge` in your config or modules. \n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dbtcloud from \"@pulumi/dbtcloud\";\n\n// a job that has github_webhook and git_provider_webhook \n// set to false will be categorized as a \"Deploy Job\"\nconst dailyJob = new dbtcloud.Job(\"daily_job\", {\n environmentId: prodEnvironment.environmentId,\n executeSteps: [\"dbt build\"],\n generateDocs: true,\n isActive: true,\n name: \"Daily job\",\n numThreads: 64,\n projectId: dbtProject.id,\n runGenerateSources: true,\n targetName: \"default\",\n triggers: {\n github_webhook: false,\n git_provider_webhook: false,\n schedule: true,\n on_merge: false,\n },\n scheduleDays: [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n ],\n scheduleType: \"days_of_week\",\n scheduleHours: [0],\n});\n// a job that has github_webhook and git_provider_webhook set \n// to true will be categorized as a \"Continuous Integration Job\"\nconst ciJob = new dbtcloud.Job(\"ci_job\", {\n environmentId: ciEnvironment.environmentId,\n executeSteps: [\"dbt build -s state:modified+ --fail-fast\"],\n generateDocs: false,\n deferringEnvironmentId: prodEnvironment.environmentId,\n name: \"CI Job\",\n numThreads: 32,\n projectId: dbtProject.id,\n runGenerateSources: false,\n triggers: {\n github_webhook: true,\n git_provider_webhook: true,\n schedule: false,\n on_merge: false,\n },\n scheduleDays: [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n ],\n scheduleType: \"days_of_week\",\n});\n// a job that is set to be triggered after another job finishes\n// this is sometimes referred as 'job chaining'\nconst downstreamJob = new dbtcloud.Job(\"downstream_job\", {\n environmentId: project2ProdEnvironment.environmentId,\n executeSteps: [\"dbt build -s +my_model\"],\n generateDocs: true,\n name: \"Downstream job in project 2\",\n numThreads: 32,\n projectId: dbtProject2.id,\n runGenerateSources: true,\n triggers: {\n github_webhook: false,\n git_provider_webhook: false,\n schedule: false,\n on_merge: false,\n },\n scheduleDays: [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n ],\n scheduleType: \"days_of_week\",\n jobCompletionTriggerCondition: {\n jobId: dailyJob.id,\n projectId: dbtProject.id,\n statuses: [\"success\"],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_dbtcloud as dbtcloud\n\n# a job that has github_webhook and git_provider_webhook \n# set to false will be categorized as a \"Deploy Job\"\ndaily_job = dbtcloud.Job(\"daily_job\",\n environment_id=prod_environment[\"environmentId\"],\n execute_steps=[\"dbt build\"],\n generate_docs=True,\n is_active=True,\n name=\"Daily job\",\n num_threads=64,\n project_id=dbt_project[\"id\"],\n run_generate_sources=True,\n target_name=\"default\",\n triggers={\n \"github_webhook\": False,\n \"git_provider_webhook\": False,\n \"schedule\": True,\n \"on_merge\": False,\n },\n schedule_days=[\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n ],\n schedule_type=\"days_of_week\",\n schedule_hours=[0])\n# a job that has github_webhook and git_provider_webhook set \n# to true will be categorized as a \"Continuous Integration Job\"\nci_job = dbtcloud.Job(\"ci_job\",\n environment_id=ci_environment[\"environmentId\"],\n execute_steps=[\"dbt build -s state:modified+ --fail-fast\"],\n generate_docs=False,\n deferring_environment_id=prod_environment[\"environmentId\"],\n name=\"CI Job\",\n num_threads=32,\n project_id=dbt_project[\"id\"],\n run_generate_sources=False,\n triggers={\n \"github_webhook\": True,\n \"git_provider_webhook\": True,\n \"schedule\": False,\n \"on_merge\": False,\n },\n schedule_days=[\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n ],\n schedule_type=\"days_of_week\")\n# a job that is set to be triggered after another job finishes\n# this is sometimes referred as 'job chaining'\ndownstream_job = dbtcloud.Job(\"downstream_job\",\n environment_id=project2_prod_environment[\"environmentId\"],\n execute_steps=[\"dbt build -s +my_model\"],\n generate_docs=True,\n name=\"Downstream job in project 2\",\n num_threads=32,\n project_id=dbt_project2[\"id\"],\n run_generate_sources=True,\n triggers={\n \"github_webhook\": False,\n \"git_provider_webhook\": False,\n \"schedule\": False,\n \"on_merge\": False,\n },\n schedule_days=[\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n ],\n schedule_type=\"days_of_week\",\n job_completion_trigger_condition={\n \"job_id\": daily_job.id,\n \"project_id\": dbt_project[\"id\"],\n \"statuses\": [\"success\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DbtCloud = Pulumi.DbtCloud;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // a job that has github_webhook and git_provider_webhook \n // set to false will be categorized as a \"Deploy Job\"\n var dailyJob = new DbtCloud.Job(\"daily_job\", new()\n {\n EnvironmentId = prodEnvironment.EnvironmentId,\n ExecuteSteps = new[]\n {\n \"dbt build\",\n },\n GenerateDocs = true,\n IsActive = true,\n Name = \"Daily job\",\n NumThreads = 64,\n ProjectId = dbtProject.Id,\n RunGenerateSources = true,\n TargetName = \"default\",\n Triggers = \n {\n { \"github_webhook\", false },\n { \"git_provider_webhook\", false },\n { \"schedule\", true },\n { \"on_merge\", false },\n },\n ScheduleDays = new[]\n {\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n },\n ScheduleType = \"days_of_week\",\n ScheduleHours = new[]\n {\n 0,\n },\n });\n\n // a job that has github_webhook and git_provider_webhook set \n // to true will be categorized as a \"Continuous Integration Job\"\n var ciJob = new DbtCloud.Job(\"ci_job\", new()\n {\n EnvironmentId = ciEnvironment.EnvironmentId,\n ExecuteSteps = new[]\n {\n \"dbt build -s state:modified+ --fail-fast\",\n },\n GenerateDocs = false,\n DeferringEnvironmentId = prodEnvironment.EnvironmentId,\n Name = \"CI Job\",\n NumThreads = 32,\n ProjectId = dbtProject.Id,\n RunGenerateSources = false,\n Triggers = \n {\n { \"github_webhook\", true },\n { \"git_provider_webhook\", true },\n { \"schedule\", false },\n { \"on_merge\", false },\n },\n ScheduleDays = new[]\n {\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n },\n ScheduleType = \"days_of_week\",\n });\n\n // a job that is set to be triggered after another job finishes\n // this is sometimes referred as 'job chaining'\n var downstreamJob = new DbtCloud.Job(\"downstream_job\", new()\n {\n EnvironmentId = project2ProdEnvironment.EnvironmentId,\n ExecuteSteps = new[]\n {\n \"dbt build -s +my_model\",\n },\n GenerateDocs = true,\n Name = \"Downstream job in project 2\",\n NumThreads = 32,\n ProjectId = dbtProject2.Id,\n RunGenerateSources = true,\n Triggers = \n {\n { \"github_webhook\", false },\n { \"git_provider_webhook\", false },\n { \"schedule\", false },\n { \"on_merge\", false },\n },\n ScheduleDays = new[]\n {\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n },\n ScheduleType = \"days_of_week\",\n CompletionTriggerCondition = new DbtCloud.Inputs.JobJobCompletionTriggerConditionArgs\n {\n JobId = dailyJob.Id,\n ProjectId = dbtProject.Id,\n Statuses = new[]\n {\n \"success\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// a job that has github_webhook and git_provider_webhook\n\t\t// set to false will be categorized as a \"Deploy Job\"\n\t\tdailyJob, err := dbtcloud.NewJob(ctx, \"daily_job\", \u0026dbtcloud.JobArgs{\n\t\t\tEnvironmentId: pulumi.Any(prodEnvironment.EnvironmentId),\n\t\t\tExecuteSteps: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"dbt build\"),\n\t\t\t},\n\t\t\tGenerateDocs: pulumi.Bool(true),\n\t\t\tIsActive: pulumi.Bool(true),\n\t\t\tName: pulumi.String(\"Daily job\"),\n\t\t\tNumThreads: pulumi.Int(64),\n\t\t\tProjectId: pulumi.Any(dbtProject.Id),\n\t\t\tRunGenerateSources: pulumi.Bool(true),\n\t\t\tTargetName: pulumi.String(\"default\"),\n\t\t\tTriggers: pulumi.BoolMap{\n\t\t\t\t\"github_webhook\": pulumi.Bool(false),\n\t\t\t\t\"git_provider_webhook\": pulumi.Bool(false),\n\t\t\t\t\"schedule\": pulumi.Bool(true),\n\t\t\t\t\"on_merge\": pulumi.Bool(false),\n\t\t\t},\n\t\t\tScheduleDays: pulumi.IntArray{\n\t\t\t\tpulumi.Int(0),\n\t\t\t\tpulumi.Int(1),\n\t\t\t\tpulumi.Int(2),\n\t\t\t\tpulumi.Int(3),\n\t\t\t\tpulumi.Int(4),\n\t\t\t\tpulumi.Int(5),\n\t\t\t\tpulumi.Int(6),\n\t\t\t},\n\t\t\tScheduleType: pulumi.String(\"days_of_week\"),\n\t\t\tScheduleHours: pulumi.IntArray{\n\t\t\t\tpulumi.Int(0),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// a job that has github_webhook and git_provider_webhook set\n\t\t// to true will be categorized as a \"Continuous Integration Job\"\n\t\t_, err = dbtcloud.NewJob(ctx, \"ci_job\", \u0026dbtcloud.JobArgs{\n\t\t\tEnvironmentId: pulumi.Any(ciEnvironment.EnvironmentId),\n\t\t\tExecuteSteps: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"dbt build -s state:modified+ --fail-fast\"),\n\t\t\t},\n\t\t\tGenerateDocs: pulumi.Bool(false),\n\t\t\tDeferringEnvironmentId: pulumi.Any(prodEnvironment.EnvironmentId),\n\t\t\tName: pulumi.String(\"CI Job\"),\n\t\t\tNumThreads: pulumi.Int(32),\n\t\t\tProjectId: pulumi.Any(dbtProject.Id),\n\t\t\tRunGenerateSources: pulumi.Bool(false),\n\t\t\tTriggers: pulumi.BoolMap{\n\t\t\t\t\"github_webhook\": pulumi.Bool(true),\n\t\t\t\t\"git_provider_webhook\": pulumi.Bool(true),\n\t\t\t\t\"schedule\": pulumi.Bool(false),\n\t\t\t\t\"on_merge\": pulumi.Bool(false),\n\t\t\t},\n\t\t\tScheduleDays: pulumi.IntArray{\n\t\t\t\tpulumi.Int(0),\n\t\t\t\tpulumi.Int(1),\n\t\t\t\tpulumi.Int(2),\n\t\t\t\tpulumi.Int(3),\n\t\t\t\tpulumi.Int(4),\n\t\t\t\tpulumi.Int(5),\n\t\t\t\tpulumi.Int(6),\n\t\t\t},\n\t\t\tScheduleType: pulumi.String(\"days_of_week\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// a job that is set to be triggered after another job finishes\n\t\t// this is sometimes referred as 'job chaining'\n\t\t_, err = dbtcloud.NewJob(ctx, \"downstream_job\", \u0026dbtcloud.JobArgs{\n\t\t\tEnvironmentId: pulumi.Any(project2ProdEnvironment.EnvironmentId),\n\t\t\tExecuteSteps: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"dbt build -s +my_model\"),\n\t\t\t},\n\t\t\tGenerateDocs: pulumi.Bool(true),\n\t\t\tName: pulumi.String(\"Downstream job in project 2\"),\n\t\t\tNumThreads: pulumi.Int(32),\n\t\t\tProjectId: pulumi.Any(dbtProject2.Id),\n\t\t\tRunGenerateSources: pulumi.Bool(true),\n\t\t\tTriggers: pulumi.BoolMap{\n\t\t\t\t\"github_webhook\": pulumi.Bool(false),\n\t\t\t\t\"git_provider_webhook\": pulumi.Bool(false),\n\t\t\t\t\"schedule\": pulumi.Bool(false),\n\t\t\t\t\"on_merge\": pulumi.Bool(false),\n\t\t\t},\n\t\t\tScheduleDays: pulumi.IntArray{\n\t\t\t\tpulumi.Int(0),\n\t\t\t\tpulumi.Int(1),\n\t\t\t\tpulumi.Int(2),\n\t\t\t\tpulumi.Int(3),\n\t\t\t\tpulumi.Int(4),\n\t\t\t\tpulumi.Int(5),\n\t\t\t\tpulumi.Int(6),\n\t\t\t},\n\t\t\tScheduleType: pulumi.String(\"days_of_week\"),\n\t\t\tJobCompletionTriggerCondition: \u0026dbtcloud.JobJobCompletionTriggerConditionArgs{\n\t\t\t\tJobId: dailyJob.ID(),\n\t\t\t\tProjectId: pulumi.Any(dbtProject.Id),\n\t\t\t\tStatuses: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"success\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dbtcloud.Job;\nimport com.pulumi.dbtcloud.JobArgs;\nimport com.pulumi.dbtcloud.inputs.JobJobCompletionTriggerConditionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // a job that has github_webhook and git_provider_webhook \n // set to false will be categorized as a \"Deploy Job\"\n var dailyJob = new Job(\"dailyJob\", JobArgs.builder()\n .environmentId(prodEnvironment.environmentId())\n .executeSteps(\"dbt build\")\n .generateDocs(true)\n .isActive(true)\n .name(\"Daily job\")\n .numThreads(64)\n .projectId(dbtProject.id())\n .runGenerateSources(true)\n .targetName(\"default\")\n .triggers(Map.ofEntries(\n Map.entry(\"github_webhook\", false),\n Map.entry(\"git_provider_webhook\", false),\n Map.entry(\"schedule\", true),\n Map.entry(\"on_merge\", false)\n ))\n .scheduleDays( \n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6)\n .scheduleType(\"days_of_week\")\n .scheduleHours(0)\n .build());\n\n // a job that has github_webhook and git_provider_webhook set \n // to true will be categorized as a \"Continuous Integration Job\"\n var ciJob = new Job(\"ciJob\", JobArgs.builder()\n .environmentId(ciEnvironment.environmentId())\n .executeSteps(\"dbt build -s state:modified+ --fail-fast\")\n .generateDocs(false)\n .deferringEnvironmentId(prodEnvironment.environmentId())\n .name(\"CI Job\")\n .numThreads(32)\n .projectId(dbtProject.id())\n .runGenerateSources(false)\n .triggers(Map.ofEntries(\n Map.entry(\"github_webhook\", true),\n Map.entry(\"git_provider_webhook\", true),\n Map.entry(\"schedule\", false),\n Map.entry(\"on_merge\", false)\n ))\n .scheduleDays( \n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6)\n .scheduleType(\"days_of_week\")\n .build());\n\n // a job that is set to be triggered after another job finishes\n // this is sometimes referred as 'job chaining'\n var downstreamJob = new Job(\"downstreamJob\", JobArgs.builder()\n .environmentId(project2ProdEnvironment.environmentId())\n .executeSteps(\"dbt build -s +my_model\")\n .generateDocs(true)\n .name(\"Downstream job in project 2\")\n .numThreads(32)\n .projectId(dbtProject2.id())\n .runGenerateSources(true)\n .triggers(Map.ofEntries(\n Map.entry(\"github_webhook\", false),\n Map.entry(\"git_provider_webhook\", false),\n Map.entry(\"schedule\", false),\n Map.entry(\"on_merge\", false)\n ))\n .scheduleDays( \n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6)\n .scheduleType(\"days_of_week\")\n .jobCompletionTriggerCondition(JobJobCompletionTriggerConditionArgs.builder()\n .jobId(dailyJob.id())\n .projectId(dbtProject.id())\n .statuses(\"success\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # a job that has github_webhook and git_provider_webhook \n # set to false will be categorized as a \"Deploy Job\"\n dailyJob:\n type: dbtcloud:Job\n name: daily_job\n properties:\n environmentId: ${prodEnvironment.environmentId}\n executeSteps:\n - dbt build\n generateDocs: true\n isActive: true\n name: Daily job\n numThreads: 64\n projectId: ${dbtProject.id}\n runGenerateSources: true\n targetName: default\n triggers:\n github_webhook: false\n git_provider_webhook: false\n schedule: true\n on_merge: false\n scheduleDays:\n - 0\n - 1\n - 2\n - 3\n - 4\n - 5\n - 6\n scheduleType: days_of_week\n scheduleHours:\n - 0\n # a job that has github_webhook and git_provider_webhook set \n # to true will be categorized as a \"Continuous Integration Job\"\n ciJob:\n type: dbtcloud:Job\n name: ci_job\n properties:\n environmentId: ${ciEnvironment.environmentId}\n executeSteps:\n - dbt build -s state:modified+ --fail-fast\n generateDocs: false\n deferringEnvironmentId: ${prodEnvironment.environmentId}\n name: CI Job\n numThreads: 32\n projectId: ${dbtProject.id}\n runGenerateSources: false\n triggers:\n github_webhook: true\n git_provider_webhook: true\n schedule: false\n on_merge: false\n scheduleDays:\n - 0\n - 1\n - 2\n - 3\n - 4\n - 5\n - 6\n scheduleType: days_of_week\n # a job that is set to be triggered after another job finishes\n # this is sometimes referred as 'job chaining'\n downstreamJob:\n type: dbtcloud:Job\n name: downstream_job\n properties:\n environmentId: ${project2ProdEnvironment.environmentId}\n executeSteps:\n - dbt build -s +my_model\n generateDocs: true\n name: Downstream job in project 2\n numThreads: 32\n projectId: ${dbtProject2.id}\n runGenerateSources: true\n triggers:\n github_webhook: false\n git_provider_webhook: false\n schedule: false\n on_merge: false\n scheduleDays:\n - 0\n - 1\n - 2\n - 3\n - 4\n - 5\n - 6\n scheduleType: days_of_week\n jobCompletionTriggerCondition:\n jobId: ${dailyJob.id}\n projectId: ${dbtProject.id}\n statuses:\n - success\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nusing import blocks (requires Terraform \u003e= 1.5)\n\nimport {\n\n to = dbtcloud_job.my_job\n\n id = \"job_id\"\n\n}\n\nimport {\n\n to = dbtcloud_job.my_job\n\n id = \"12345\"\n\n}\n\nusing the older import command\n\n```sh\n$ pulumi import dbtcloud:index/job:Job my_job \"job_id\"\n```\n\n```sh\n$ pulumi import dbtcloud:index/job:Job my_job 12345\n```\n\n", "properties": { diff --git a/provider/go.mod b/provider/go.mod index c67c09c..ec75bd4 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.3 replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240520223432-0c0bf0d65f10 require ( - github.com/dbt-labs/terraform-provider-dbtcloud v0.3.21 + github.com/dbt-labs/terraform-provider-dbtcloud v0.3.22 github.com/pulumi/pulumi-terraform-bridge/v3 v3.94.0 github.com/pulumi/pulumi/sdk/v3 v3.137.0 ) diff --git a/provider/go.sum b/provider/go.sum index 45725a2..c528a69 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1321,8 +1321,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dbt-labs/terraform-provider-dbtcloud v0.3.21 h1:Tas4jythbeByI1mlPvqwLKuxYcBPtwFIjWZqVHjyKYw= -github.com/dbt-labs/terraform-provider-dbtcloud v0.3.21/go.mod h1:yxU6SKTrwoHnVtkDtjHIjHTl/3Ast0oN6/ugp2LD4lI= +github.com/dbt-labs/terraform-provider-dbtcloud v0.3.22 h1:ERqOasoGm2E87EErr/K4iX7VuAffe5kRiILImNHZZg0= +github.com/dbt-labs/terraform-provider-dbtcloud v0.3.22/go.mod h1:yxU6SKTrwoHnVtkDtjHIjHTl/3Ast0oN6/ugp2LD4lI= github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/djherbis/times v1.6.0 h1:w2ctJ92J8fBvWPxugmXIv7Nz7Q3iDMKNx9v5ocVH20c= diff --git a/provider/resources.go b/provider/resources.go index 1bd11ba..f646924 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -169,6 +169,11 @@ func Provider(ctx context.Context) tfbridge.ProviderInfo { "id": {Type: "string"}, }, }, + "dbtcloud_ip_restrictions_rule": { + Fields: map[string]*tfbridge.SchemaInfo{ + "id": {Type: "string"}, + }, + }, "dbtcloud_service_token": { Tok: tfbridge.MakeResource(mainPkg, mainMod, "ServiceToken"), }, diff --git a/sdk/dotnet/AccountFeatures.cs b/sdk/dotnet/AccountFeatures.cs new file mode 100644 index 0000000..2c2880d --- /dev/null +++ b/sdk/dotnet/AccountFeatures.cs @@ -0,0 +1,134 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DbtCloud +{ + /// + /// Manages dbt Cloud global features at the account level, like Advanced CI. The same feature should not be configured in different resources to avoid conflicts. + /// + /// When destroying the resource or removing the value for an attribute, the features status will not be changed. Deactivating features will require applying them wih the value set to `false`. + /// + [DbtCloudResourceType("dbtcloud:index/accountFeatures:AccountFeatures")] + public partial class AccountFeatures : global::Pulumi.CustomResource + { + /// + /// Whether advanced CI is enabled. + /// + [Output("advancedCi")] + public Output AdvancedCi { get; private set; } = null!; + + /// + /// Whether partial parsing is enabled. + /// + [Output("partialParsing")] + public Output PartialParsing { get; private set; } = null!; + + /// + /// Whether repository caching is enabled. + /// + [Output("repoCaching")] + public Output RepoCaching { get; private set; } = null!; + + + /// + /// Create a AccountFeatures resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public AccountFeatures(string name, AccountFeaturesArgs? args = null, CustomResourceOptions? options = null) + : base("dbtcloud:index/accountFeatures:AccountFeatures", name, args ?? new AccountFeaturesArgs(), MakeResourceOptions(options, "")) + { + } + + private AccountFeatures(string name, Input id, AccountFeaturesState? state = null, CustomResourceOptions? options = null) + : base("dbtcloud:index/accountFeatures:AccountFeatures", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + PluginDownloadURL = "github://api.github.com/pulumi/pulumi-dbtcloud", + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing AccountFeatures resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static AccountFeatures Get(string name, Input id, AccountFeaturesState? state = null, CustomResourceOptions? options = null) + { + return new AccountFeatures(name, id, state, options); + } + } + + public sealed class AccountFeaturesArgs : global::Pulumi.ResourceArgs + { + /// + /// Whether advanced CI is enabled. + /// + [Input("advancedCi")] + public Input? AdvancedCi { get; set; } + + /// + /// Whether partial parsing is enabled. + /// + [Input("partialParsing")] + public Input? PartialParsing { get; set; } + + /// + /// Whether repository caching is enabled. + /// + [Input("repoCaching")] + public Input? RepoCaching { get; set; } + + public AccountFeaturesArgs() + { + } + public static new AccountFeaturesArgs Empty => new AccountFeaturesArgs(); + } + + public sealed class AccountFeaturesState : global::Pulumi.ResourceArgs + { + /// + /// Whether advanced CI is enabled. + /// + [Input("advancedCi")] + public Input? AdvancedCi { get; set; } + + /// + /// Whether partial parsing is enabled. + /// + [Input("partialParsing")] + public Input? PartialParsing { get; set; } + + /// + /// Whether repository caching is enabled. + /// + [Input("repoCaching")] + public Input? RepoCaching { get; set; } + + public AccountFeaturesState() + { + } + public static new AccountFeaturesState Empty => new AccountFeaturesState(); + } +} diff --git a/sdk/dotnet/Inputs/IpRestrictionsRuleCidrArgs.cs b/sdk/dotnet/Inputs/IpRestrictionsRuleCidrArgs.cs new file mode 100644 index 0000000..d842211 --- /dev/null +++ b/sdk/dotnet/Inputs/IpRestrictionsRuleCidrArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DbtCloud.Inputs +{ + + public sealed class IpRestrictionsRuleCidrArgs : global::Pulumi.ResourceArgs + { + /// + /// IP CIDR range (can be IPv4 or IPv6) + /// + [Input("cidr")] + public Input? Cidr { get; set; } + + /// + /// IPv6 CIDR range (read-only) + /// + [Input("cidrIpv6")] + public Input? CidrIpv6 { get; set; } + + /// + /// ID of the CIDR range + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// ID of the IP restriction rule + /// + [Input("ipRestrictionRuleId")] + public Input? IpRestrictionRuleId { get; set; } + + public IpRestrictionsRuleCidrArgs() + { + } + public static new IpRestrictionsRuleCidrArgs Empty => new IpRestrictionsRuleCidrArgs(); + } +} diff --git a/sdk/dotnet/Inputs/IpRestrictionsRuleCidrGetArgs.cs b/sdk/dotnet/Inputs/IpRestrictionsRuleCidrGetArgs.cs new file mode 100644 index 0000000..5ab58b1 --- /dev/null +++ b/sdk/dotnet/Inputs/IpRestrictionsRuleCidrGetArgs.cs @@ -0,0 +1,44 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DbtCloud.Inputs +{ + + public sealed class IpRestrictionsRuleCidrGetArgs : global::Pulumi.ResourceArgs + { + /// + /// IP CIDR range (can be IPv4 or IPv6) + /// + [Input("cidr")] + public Input? Cidr { get; set; } + + /// + /// IPv6 CIDR range (read-only) + /// + [Input("cidrIpv6")] + public Input? CidrIpv6 { get; set; } + + /// + /// ID of the CIDR range + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// ID of the IP restriction rule + /// + [Input("ipRestrictionRuleId")] + public Input? IpRestrictionRuleId { get; set; } + + public IpRestrictionsRuleCidrGetArgs() + { + } + public static new IpRestrictionsRuleCidrGetArgs Empty => new IpRestrictionsRuleCidrGetArgs(); + } +} diff --git a/sdk/dotnet/IpRestrictionsRule.cs b/sdk/dotnet/IpRestrictionsRule.cs new file mode 100644 index 0000000..752b2a9 --- /dev/null +++ b/sdk/dotnet/IpRestrictionsRule.cs @@ -0,0 +1,242 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DbtCloud +{ + /// + /// Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DbtCloud = Pulumi.DbtCloud; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = new DbtCloud.IpRestrictionsRule("test", new() + /// { + /// Name = "My restriction rule", + /// Description = "Important description", + /// Cidrs = new[] + /// { + /// new DbtCloud.Inputs.IpRestrictionsRuleCidrArgs + /// { + /// Cidr = "::ffff:106:708", + /// }, + /// new DbtCloud.Inputs.IpRestrictionsRuleCidrArgs + /// { + /// Cidr = "1.6.7.10/24", + /// }, + /// }, + /// Type = "deny", + /// RuleSetEnabled = false, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// using import blocks (requires Terraform >= 1.5) + /// + /// import { + /// + /// to = dbtcloud_ip_restrictions_rule.my_rule + /// + /// id = "ip_restriction_rule_id" + /// + /// } + /// + /// import { + /// + /// to = dbtcloud_ip_restrictions_rule.my_rule + /// + /// id = "12345" + /// + /// } + /// + /// using the older import command + /// + /// ```sh + /// $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule "ip_restriction_rule_id" + /// ``` + /// + /// ```sh + /// $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule 12345 + /// ``` + /// + [DbtCloudResourceType("dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule")] + public partial class IpRestrictionsRule : global::Pulumi.CustomResource + { + /// + /// Set of CIDR ranges for this rule + /// + [Output("cidrs")] + public Output> Cidrs { get; private set; } = null!; + + /// + /// A description of the IP restriction rule + /// + [Output("description")] + public Output Description { get; private set; } = null!; + + /// + /// The name of the IP restriction rule + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + /// + [Output("ruleSetEnabled")] + public Output RuleSetEnabled { get; private set; } = null!; + + /// + /// The type of the IP restriction rule (allow or deny) + /// + [Output("type")] + public Output Type { get; private set; } = null!; + + + /// + /// Create a IpRestrictionsRule resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public IpRestrictionsRule(string name, IpRestrictionsRuleArgs args, CustomResourceOptions? options = null) + : base("dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule", name, args ?? new IpRestrictionsRuleArgs(), MakeResourceOptions(options, "")) + { + } + + private IpRestrictionsRule(string name, Input id, IpRestrictionsRuleState? state = null, CustomResourceOptions? options = null) + : base("dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + PluginDownloadURL = "github://api.github.com/pulumi/pulumi-dbtcloud", + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing IpRestrictionsRule resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static IpRestrictionsRule Get(string name, Input id, IpRestrictionsRuleState? state = null, CustomResourceOptions? options = null) + { + return new IpRestrictionsRule(name, id, state, options); + } + } + + public sealed class IpRestrictionsRuleArgs : global::Pulumi.ResourceArgs + { + [Input("cidrs", required: true)] + private InputList? _cidrs; + + /// + /// Set of CIDR ranges for this rule + /// + public InputList Cidrs + { + get => _cidrs ?? (_cidrs = new InputList()); + set => _cidrs = value; + } + + /// + /// A description of the IP restriction rule + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// The name of the IP restriction rule + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + /// + [Input("ruleSetEnabled", required: true)] + public Input RuleSetEnabled { get; set; } = null!; + + /// + /// The type of the IP restriction rule (allow or deny) + /// + [Input("type", required: true)] + public Input Type { get; set; } = null!; + + public IpRestrictionsRuleArgs() + { + } + public static new IpRestrictionsRuleArgs Empty => new IpRestrictionsRuleArgs(); + } + + public sealed class IpRestrictionsRuleState : global::Pulumi.ResourceArgs + { + [Input("cidrs")] + private InputList? _cidrs; + + /// + /// Set of CIDR ranges for this rule + /// + public InputList Cidrs + { + get => _cidrs ?? (_cidrs = new InputList()); + set => _cidrs = value; + } + + /// + /// A description of the IP restriction rule + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// The name of the IP restriction rule + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + /// + [Input("ruleSetEnabled")] + public Input? RuleSetEnabled { get; set; } + + /// + /// The type of the IP restriction rule (allow or deny) + /// + [Input("type")] + public Input? Type { get; set; } + + public IpRestrictionsRuleState() + { + } + public static new IpRestrictionsRuleState Empty => new IpRestrictionsRuleState(); + } +} diff --git a/sdk/dotnet/Outputs/IpRestrictionsRuleCidr.cs b/sdk/dotnet/Outputs/IpRestrictionsRuleCidr.cs new file mode 100644 index 0000000..82ce436 --- /dev/null +++ b/sdk/dotnet/Outputs/IpRestrictionsRuleCidr.cs @@ -0,0 +1,49 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DbtCloud.Outputs +{ + + [OutputType] + public sealed class IpRestrictionsRuleCidr + { + /// + /// IP CIDR range (can be IPv4 or IPv6) + /// + public readonly string? Cidr; + /// + /// IPv6 CIDR range (read-only) + /// + public readonly string? CidrIpv6; + /// + /// ID of the CIDR range + /// + public readonly int? Id; + /// + /// ID of the IP restriction rule + /// + public readonly int? IpRestrictionRuleId; + + [OutputConstructor] + private IpRestrictionsRuleCidr( + string? cidr, + + string? cidrIpv6, + + int? id, + + int? ipRestrictionRuleId) + { + Cidr = cidr; + CidrIpv6 = cidrIpv6; + Id = id; + IpRestrictionRuleId = ipRestrictionRuleId; + } + } +} diff --git a/sdk/go/dbtcloud/accountFeatures.go b/sdk/go/dbtcloud/accountFeatures.go new file mode 100644 index 0000000..e166c08 --- /dev/null +++ b/sdk/go/dbtcloud/accountFeatures.go @@ -0,0 +1,247 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dbtcloud + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Manages dbt Cloud global features at the account level, like Advanced CI. The same feature should not be configured in different resources to avoid conflicts. +// +// When destroying the resource or removing the value for an attribute, the features status will not be changed. Deactivating features will require applying them wih the value set to `false`. +type AccountFeatures struct { + pulumi.CustomResourceState + + // Whether advanced CI is enabled. + AdvancedCi pulumi.BoolOutput `pulumi:"advancedCi"` + // Whether partial parsing is enabled. + PartialParsing pulumi.BoolOutput `pulumi:"partialParsing"` + // Whether repository caching is enabled. + RepoCaching pulumi.BoolOutput `pulumi:"repoCaching"` +} + +// NewAccountFeatures registers a new resource with the given unique name, arguments, and options. +func NewAccountFeatures(ctx *pulumi.Context, + name string, args *AccountFeaturesArgs, opts ...pulumi.ResourceOption) (*AccountFeatures, error) { + if args == nil { + args = &AccountFeaturesArgs{} + } + + opts = internal.PkgResourceDefaultOpts(opts) + var resource AccountFeatures + err := ctx.RegisterResource("dbtcloud:index/accountFeatures:AccountFeatures", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetAccountFeatures gets an existing AccountFeatures resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetAccountFeatures(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *AccountFeaturesState, opts ...pulumi.ResourceOption) (*AccountFeatures, error) { + var resource AccountFeatures + err := ctx.ReadResource("dbtcloud:index/accountFeatures:AccountFeatures", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering AccountFeatures resources. +type accountFeaturesState struct { + // Whether advanced CI is enabled. + AdvancedCi *bool `pulumi:"advancedCi"` + // Whether partial parsing is enabled. + PartialParsing *bool `pulumi:"partialParsing"` + // Whether repository caching is enabled. + RepoCaching *bool `pulumi:"repoCaching"` +} + +type AccountFeaturesState struct { + // Whether advanced CI is enabled. + AdvancedCi pulumi.BoolPtrInput + // Whether partial parsing is enabled. + PartialParsing pulumi.BoolPtrInput + // Whether repository caching is enabled. + RepoCaching pulumi.BoolPtrInput +} + +func (AccountFeaturesState) ElementType() reflect.Type { + return reflect.TypeOf((*accountFeaturesState)(nil)).Elem() +} + +type accountFeaturesArgs struct { + // Whether advanced CI is enabled. + AdvancedCi *bool `pulumi:"advancedCi"` + // Whether partial parsing is enabled. + PartialParsing *bool `pulumi:"partialParsing"` + // Whether repository caching is enabled. + RepoCaching *bool `pulumi:"repoCaching"` +} + +// The set of arguments for constructing a AccountFeatures resource. +type AccountFeaturesArgs struct { + // Whether advanced CI is enabled. + AdvancedCi pulumi.BoolPtrInput + // Whether partial parsing is enabled. + PartialParsing pulumi.BoolPtrInput + // Whether repository caching is enabled. + RepoCaching pulumi.BoolPtrInput +} + +func (AccountFeaturesArgs) ElementType() reflect.Type { + return reflect.TypeOf((*accountFeaturesArgs)(nil)).Elem() +} + +type AccountFeaturesInput interface { + pulumi.Input + + ToAccountFeaturesOutput() AccountFeaturesOutput + ToAccountFeaturesOutputWithContext(ctx context.Context) AccountFeaturesOutput +} + +func (*AccountFeatures) ElementType() reflect.Type { + return reflect.TypeOf((**AccountFeatures)(nil)).Elem() +} + +func (i *AccountFeatures) ToAccountFeaturesOutput() AccountFeaturesOutput { + return i.ToAccountFeaturesOutputWithContext(context.Background()) +} + +func (i *AccountFeatures) ToAccountFeaturesOutputWithContext(ctx context.Context) AccountFeaturesOutput { + return pulumi.ToOutputWithContext(ctx, i).(AccountFeaturesOutput) +} + +// AccountFeaturesArrayInput is an input type that accepts AccountFeaturesArray and AccountFeaturesArrayOutput values. +// You can construct a concrete instance of `AccountFeaturesArrayInput` via: +// +// AccountFeaturesArray{ AccountFeaturesArgs{...} } +type AccountFeaturesArrayInput interface { + pulumi.Input + + ToAccountFeaturesArrayOutput() AccountFeaturesArrayOutput + ToAccountFeaturesArrayOutputWithContext(context.Context) AccountFeaturesArrayOutput +} + +type AccountFeaturesArray []AccountFeaturesInput + +func (AccountFeaturesArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*AccountFeatures)(nil)).Elem() +} + +func (i AccountFeaturesArray) ToAccountFeaturesArrayOutput() AccountFeaturesArrayOutput { + return i.ToAccountFeaturesArrayOutputWithContext(context.Background()) +} + +func (i AccountFeaturesArray) ToAccountFeaturesArrayOutputWithContext(ctx context.Context) AccountFeaturesArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(AccountFeaturesArrayOutput) +} + +// AccountFeaturesMapInput is an input type that accepts AccountFeaturesMap and AccountFeaturesMapOutput values. +// You can construct a concrete instance of `AccountFeaturesMapInput` via: +// +// AccountFeaturesMap{ "key": AccountFeaturesArgs{...} } +type AccountFeaturesMapInput interface { + pulumi.Input + + ToAccountFeaturesMapOutput() AccountFeaturesMapOutput + ToAccountFeaturesMapOutputWithContext(context.Context) AccountFeaturesMapOutput +} + +type AccountFeaturesMap map[string]AccountFeaturesInput + +func (AccountFeaturesMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*AccountFeatures)(nil)).Elem() +} + +func (i AccountFeaturesMap) ToAccountFeaturesMapOutput() AccountFeaturesMapOutput { + return i.ToAccountFeaturesMapOutputWithContext(context.Background()) +} + +func (i AccountFeaturesMap) ToAccountFeaturesMapOutputWithContext(ctx context.Context) AccountFeaturesMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(AccountFeaturesMapOutput) +} + +type AccountFeaturesOutput struct{ *pulumi.OutputState } + +func (AccountFeaturesOutput) ElementType() reflect.Type { + return reflect.TypeOf((**AccountFeatures)(nil)).Elem() +} + +func (o AccountFeaturesOutput) ToAccountFeaturesOutput() AccountFeaturesOutput { + return o +} + +func (o AccountFeaturesOutput) ToAccountFeaturesOutputWithContext(ctx context.Context) AccountFeaturesOutput { + return o +} + +// Whether advanced CI is enabled. +func (o AccountFeaturesOutput) AdvancedCi() pulumi.BoolOutput { + return o.ApplyT(func(v *AccountFeatures) pulumi.BoolOutput { return v.AdvancedCi }).(pulumi.BoolOutput) +} + +// Whether partial parsing is enabled. +func (o AccountFeaturesOutput) PartialParsing() pulumi.BoolOutput { + return o.ApplyT(func(v *AccountFeatures) pulumi.BoolOutput { return v.PartialParsing }).(pulumi.BoolOutput) +} + +// Whether repository caching is enabled. +func (o AccountFeaturesOutput) RepoCaching() pulumi.BoolOutput { + return o.ApplyT(func(v *AccountFeatures) pulumi.BoolOutput { return v.RepoCaching }).(pulumi.BoolOutput) +} + +type AccountFeaturesArrayOutput struct{ *pulumi.OutputState } + +func (AccountFeaturesArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*AccountFeatures)(nil)).Elem() +} + +func (o AccountFeaturesArrayOutput) ToAccountFeaturesArrayOutput() AccountFeaturesArrayOutput { + return o +} + +func (o AccountFeaturesArrayOutput) ToAccountFeaturesArrayOutputWithContext(ctx context.Context) AccountFeaturesArrayOutput { + return o +} + +func (o AccountFeaturesArrayOutput) Index(i pulumi.IntInput) AccountFeaturesOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountFeatures { + return vs[0].([]*AccountFeatures)[vs[1].(int)] + }).(AccountFeaturesOutput) +} + +type AccountFeaturesMapOutput struct{ *pulumi.OutputState } + +func (AccountFeaturesMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*AccountFeatures)(nil)).Elem() +} + +func (o AccountFeaturesMapOutput) ToAccountFeaturesMapOutput() AccountFeaturesMapOutput { + return o +} + +func (o AccountFeaturesMapOutput) ToAccountFeaturesMapOutputWithContext(ctx context.Context) AccountFeaturesMapOutput { + return o +} + +func (o AccountFeaturesMapOutput) MapIndex(k pulumi.StringInput) AccountFeaturesOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountFeatures { + return vs[0].(map[string]*AccountFeatures)[vs[1].(string)] + }).(AccountFeaturesOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*AccountFeaturesInput)(nil)).Elem(), &AccountFeatures{}) + pulumi.RegisterInputType(reflect.TypeOf((*AccountFeaturesArrayInput)(nil)).Elem(), AccountFeaturesArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*AccountFeaturesMapInput)(nil)).Elem(), AccountFeaturesMap{}) + pulumi.RegisterOutputType(AccountFeaturesOutput{}) + pulumi.RegisterOutputType(AccountFeaturesArrayOutput{}) + pulumi.RegisterOutputType(AccountFeaturesMapOutput{}) +} diff --git a/sdk/go/dbtcloud/init.go b/sdk/go/dbtcloud/init.go index b8e5fb1..8892343 100644 --- a/sdk/go/dbtcloud/init.go +++ b/sdk/go/dbtcloud/init.go @@ -21,6 +21,8 @@ func (m *module) Version() semver.Version { func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { + case "dbtcloud:index/accountFeatures:AccountFeatures": + r = &AccountFeatures{} case "dbtcloud:index/bigQueryConnection:BigQueryConnection": r = &BigQueryConnection{} case "dbtcloud:index/bigQueryCredential:BigQueryCredential": @@ -47,6 +49,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &Group{} case "dbtcloud:index/groupPartialPermissions:GroupPartialPermissions": r = &GroupPartialPermissions{} + case "dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule": + r = &IpRestrictionsRule{} case "dbtcloud:index/job:Job": r = &Job{} case "dbtcloud:index/licenseMap:LicenseMap": @@ -112,6 +116,11 @@ func init() { if err != nil { version = semver.Version{Major: 1} } + pulumi.RegisterResourceModule( + "dbtcloud", + "index/accountFeatures", + &module{version}, + ) pulumi.RegisterResourceModule( "dbtcloud", "index/bigQueryConnection", @@ -177,6 +186,11 @@ func init() { "index/groupPartialPermissions", &module{version}, ) + pulumi.RegisterResourceModule( + "dbtcloud", + "index/ipRestrictionsRule", + &module{version}, + ) pulumi.RegisterResourceModule( "dbtcloud", "index/job", diff --git a/sdk/go/dbtcloud/ipRestrictionsRule.go b/sdk/go/dbtcloud/ipRestrictionsRule.go new file mode 100644 index 0000000..1bd1b63 --- /dev/null +++ b/sdk/go/dbtcloud/ipRestrictionsRule.go @@ -0,0 +1,352 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dbtcloud + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dbtcloud.NewIpRestrictionsRule(ctx, "test", &dbtcloud.IpRestrictionsRuleArgs{ +// Name: pulumi.String("My restriction rule"), +// Description: pulumi.String("Important description"), +// Cidrs: dbtcloud.IpRestrictionsRuleCidrArray{ +// &dbtcloud.IpRestrictionsRuleCidrArgs{ +// Cidr: pulumi.String("::ffff:106:708"), +// }, +// &dbtcloud.IpRestrictionsRuleCidrArgs{ +// Cidr: pulumi.String("1.6.7.10/24"), +// }, +// }, +// Type: pulumi.String("deny"), +// RuleSetEnabled: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// using import blocks (requires Terraform >= 1.5) +// +// import { +// +// to = dbtcloud_ip_restrictions_rule.my_rule +// +// id = "ip_restriction_rule_id" +// +// } +// +// import { +// +// to = dbtcloud_ip_restrictions_rule.my_rule +// +// id = "12345" +// +// } +// +// using the older import command +// +// ```sh +// $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule "ip_restriction_rule_id" +// ``` +// +// ```sh +// $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule 12345 +// ``` +type IpRestrictionsRule struct { + pulumi.CustomResourceState + + // Set of CIDR ranges for this rule + Cidrs IpRestrictionsRuleCidrArrayOutput `pulumi:"cidrs"` + // A description of the IP restriction rule + Description pulumi.StringPtrOutput `pulumi:"description"` + // The name of the IP restriction rule + Name pulumi.StringOutput `pulumi:"name"` + // Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + RuleSetEnabled pulumi.BoolOutput `pulumi:"ruleSetEnabled"` + // The type of the IP restriction rule (allow or deny) + Type pulumi.StringOutput `pulumi:"type"` +} + +// NewIpRestrictionsRule registers a new resource with the given unique name, arguments, and options. +func NewIpRestrictionsRule(ctx *pulumi.Context, + name string, args *IpRestrictionsRuleArgs, opts ...pulumi.ResourceOption) (*IpRestrictionsRule, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Cidrs == nil { + return nil, errors.New("invalid value for required argument 'Cidrs'") + } + if args.RuleSetEnabled == nil { + return nil, errors.New("invalid value for required argument 'RuleSetEnabled'") + } + if args.Type == nil { + return nil, errors.New("invalid value for required argument 'Type'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource IpRestrictionsRule + err := ctx.RegisterResource("dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetIpRestrictionsRule gets an existing IpRestrictionsRule resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetIpRestrictionsRule(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *IpRestrictionsRuleState, opts ...pulumi.ResourceOption) (*IpRestrictionsRule, error) { + var resource IpRestrictionsRule + err := ctx.ReadResource("dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering IpRestrictionsRule resources. +type ipRestrictionsRuleState struct { + // Set of CIDR ranges for this rule + Cidrs []IpRestrictionsRuleCidr `pulumi:"cidrs"` + // A description of the IP restriction rule + Description *string `pulumi:"description"` + // The name of the IP restriction rule + Name *string `pulumi:"name"` + // Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + RuleSetEnabled *bool `pulumi:"ruleSetEnabled"` + // The type of the IP restriction rule (allow or deny) + Type *string `pulumi:"type"` +} + +type IpRestrictionsRuleState struct { + // Set of CIDR ranges for this rule + Cidrs IpRestrictionsRuleCidrArrayInput + // A description of the IP restriction rule + Description pulumi.StringPtrInput + // The name of the IP restriction rule + Name pulumi.StringPtrInput + // Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + RuleSetEnabled pulumi.BoolPtrInput + // The type of the IP restriction rule (allow or deny) + Type pulumi.StringPtrInput +} + +func (IpRestrictionsRuleState) ElementType() reflect.Type { + return reflect.TypeOf((*ipRestrictionsRuleState)(nil)).Elem() +} + +type ipRestrictionsRuleArgs struct { + // Set of CIDR ranges for this rule + Cidrs []IpRestrictionsRuleCidr `pulumi:"cidrs"` + // A description of the IP restriction rule + Description *string `pulumi:"description"` + // The name of the IP restriction rule + Name *string `pulumi:"name"` + // Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + RuleSetEnabled bool `pulumi:"ruleSetEnabled"` + // The type of the IP restriction rule (allow or deny) + Type string `pulumi:"type"` +} + +// The set of arguments for constructing a IpRestrictionsRule resource. +type IpRestrictionsRuleArgs struct { + // Set of CIDR ranges for this rule + Cidrs IpRestrictionsRuleCidrArrayInput + // A description of the IP restriction rule + Description pulumi.StringPtrInput + // The name of the IP restriction rule + Name pulumi.StringPtrInput + // Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + RuleSetEnabled pulumi.BoolInput + // The type of the IP restriction rule (allow or deny) + Type pulumi.StringInput +} + +func (IpRestrictionsRuleArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ipRestrictionsRuleArgs)(nil)).Elem() +} + +type IpRestrictionsRuleInput interface { + pulumi.Input + + ToIpRestrictionsRuleOutput() IpRestrictionsRuleOutput + ToIpRestrictionsRuleOutputWithContext(ctx context.Context) IpRestrictionsRuleOutput +} + +func (*IpRestrictionsRule) ElementType() reflect.Type { + return reflect.TypeOf((**IpRestrictionsRule)(nil)).Elem() +} + +func (i *IpRestrictionsRule) ToIpRestrictionsRuleOutput() IpRestrictionsRuleOutput { + return i.ToIpRestrictionsRuleOutputWithContext(context.Background()) +} + +func (i *IpRestrictionsRule) ToIpRestrictionsRuleOutputWithContext(ctx context.Context) IpRestrictionsRuleOutput { + return pulumi.ToOutputWithContext(ctx, i).(IpRestrictionsRuleOutput) +} + +// IpRestrictionsRuleArrayInput is an input type that accepts IpRestrictionsRuleArray and IpRestrictionsRuleArrayOutput values. +// You can construct a concrete instance of `IpRestrictionsRuleArrayInput` via: +// +// IpRestrictionsRuleArray{ IpRestrictionsRuleArgs{...} } +type IpRestrictionsRuleArrayInput interface { + pulumi.Input + + ToIpRestrictionsRuleArrayOutput() IpRestrictionsRuleArrayOutput + ToIpRestrictionsRuleArrayOutputWithContext(context.Context) IpRestrictionsRuleArrayOutput +} + +type IpRestrictionsRuleArray []IpRestrictionsRuleInput + +func (IpRestrictionsRuleArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*IpRestrictionsRule)(nil)).Elem() +} + +func (i IpRestrictionsRuleArray) ToIpRestrictionsRuleArrayOutput() IpRestrictionsRuleArrayOutput { + return i.ToIpRestrictionsRuleArrayOutputWithContext(context.Background()) +} + +func (i IpRestrictionsRuleArray) ToIpRestrictionsRuleArrayOutputWithContext(ctx context.Context) IpRestrictionsRuleArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(IpRestrictionsRuleArrayOutput) +} + +// IpRestrictionsRuleMapInput is an input type that accepts IpRestrictionsRuleMap and IpRestrictionsRuleMapOutput values. +// You can construct a concrete instance of `IpRestrictionsRuleMapInput` via: +// +// IpRestrictionsRuleMap{ "key": IpRestrictionsRuleArgs{...} } +type IpRestrictionsRuleMapInput interface { + pulumi.Input + + ToIpRestrictionsRuleMapOutput() IpRestrictionsRuleMapOutput + ToIpRestrictionsRuleMapOutputWithContext(context.Context) IpRestrictionsRuleMapOutput +} + +type IpRestrictionsRuleMap map[string]IpRestrictionsRuleInput + +func (IpRestrictionsRuleMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*IpRestrictionsRule)(nil)).Elem() +} + +func (i IpRestrictionsRuleMap) ToIpRestrictionsRuleMapOutput() IpRestrictionsRuleMapOutput { + return i.ToIpRestrictionsRuleMapOutputWithContext(context.Background()) +} + +func (i IpRestrictionsRuleMap) ToIpRestrictionsRuleMapOutputWithContext(ctx context.Context) IpRestrictionsRuleMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(IpRestrictionsRuleMapOutput) +} + +type IpRestrictionsRuleOutput struct{ *pulumi.OutputState } + +func (IpRestrictionsRuleOutput) ElementType() reflect.Type { + return reflect.TypeOf((**IpRestrictionsRule)(nil)).Elem() +} + +func (o IpRestrictionsRuleOutput) ToIpRestrictionsRuleOutput() IpRestrictionsRuleOutput { + return o +} + +func (o IpRestrictionsRuleOutput) ToIpRestrictionsRuleOutputWithContext(ctx context.Context) IpRestrictionsRuleOutput { + return o +} + +// Set of CIDR ranges for this rule +func (o IpRestrictionsRuleOutput) Cidrs() IpRestrictionsRuleCidrArrayOutput { + return o.ApplyT(func(v *IpRestrictionsRule) IpRestrictionsRuleCidrArrayOutput { return v.Cidrs }).(IpRestrictionsRuleCidrArrayOutput) +} + +// A description of the IP restriction rule +func (o IpRestrictionsRuleOutput) Description() pulumi.StringPtrOutput { + return o.ApplyT(func(v *IpRestrictionsRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) +} + +// The name of the IP restriction rule +func (o IpRestrictionsRuleOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v *IpRestrictionsRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) +} + +// Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. +func (o IpRestrictionsRuleOutput) RuleSetEnabled() pulumi.BoolOutput { + return o.ApplyT(func(v *IpRestrictionsRule) pulumi.BoolOutput { return v.RuleSetEnabled }).(pulumi.BoolOutput) +} + +// The type of the IP restriction rule (allow or deny) +func (o IpRestrictionsRuleOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v *IpRestrictionsRule) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) +} + +type IpRestrictionsRuleArrayOutput struct{ *pulumi.OutputState } + +func (IpRestrictionsRuleArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*IpRestrictionsRule)(nil)).Elem() +} + +func (o IpRestrictionsRuleArrayOutput) ToIpRestrictionsRuleArrayOutput() IpRestrictionsRuleArrayOutput { + return o +} + +func (o IpRestrictionsRuleArrayOutput) ToIpRestrictionsRuleArrayOutputWithContext(ctx context.Context) IpRestrictionsRuleArrayOutput { + return o +} + +func (o IpRestrictionsRuleArrayOutput) Index(i pulumi.IntInput) IpRestrictionsRuleOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IpRestrictionsRule { + return vs[0].([]*IpRestrictionsRule)[vs[1].(int)] + }).(IpRestrictionsRuleOutput) +} + +type IpRestrictionsRuleMapOutput struct{ *pulumi.OutputState } + +func (IpRestrictionsRuleMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*IpRestrictionsRule)(nil)).Elem() +} + +func (o IpRestrictionsRuleMapOutput) ToIpRestrictionsRuleMapOutput() IpRestrictionsRuleMapOutput { + return o +} + +func (o IpRestrictionsRuleMapOutput) ToIpRestrictionsRuleMapOutputWithContext(ctx context.Context) IpRestrictionsRuleMapOutput { + return o +} + +func (o IpRestrictionsRuleMapOutput) MapIndex(k pulumi.StringInput) IpRestrictionsRuleOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IpRestrictionsRule { + return vs[0].(map[string]*IpRestrictionsRule)[vs[1].(string)] + }).(IpRestrictionsRuleOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*IpRestrictionsRuleInput)(nil)).Elem(), &IpRestrictionsRule{}) + pulumi.RegisterInputType(reflect.TypeOf((*IpRestrictionsRuleArrayInput)(nil)).Elem(), IpRestrictionsRuleArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*IpRestrictionsRuleMapInput)(nil)).Elem(), IpRestrictionsRuleMap{}) + pulumi.RegisterOutputType(IpRestrictionsRuleOutput{}) + pulumi.RegisterOutputType(IpRestrictionsRuleArrayOutput{}) + pulumi.RegisterOutputType(IpRestrictionsRuleMapOutput{}) +} diff --git a/sdk/go/dbtcloud/pulumiTypes.go b/sdk/go/dbtcloud/pulumiTypes.go index d8a09ea..0baec56 100644 --- a/sdk/go/dbtcloud/pulumiTypes.go +++ b/sdk/go/dbtcloud/pulumiTypes.go @@ -3430,6 +3430,130 @@ func (o GroupPartialPermissionsGroupPermissionArrayOutput) Index(i pulumi.IntInp }).(GroupPartialPermissionsGroupPermissionOutput) } +type IpRestrictionsRuleCidr struct { + // IP CIDR range (can be IPv4 or IPv6) + Cidr *string `pulumi:"cidr"` + // IPv6 CIDR range (read-only) + CidrIpv6 *string `pulumi:"cidrIpv6"` + // ID of the CIDR range + Id *int `pulumi:"id"` + // ID of the IP restriction rule + IpRestrictionRuleId *int `pulumi:"ipRestrictionRuleId"` +} + +// IpRestrictionsRuleCidrInput is an input type that accepts IpRestrictionsRuleCidrArgs and IpRestrictionsRuleCidrOutput values. +// You can construct a concrete instance of `IpRestrictionsRuleCidrInput` via: +// +// IpRestrictionsRuleCidrArgs{...} +type IpRestrictionsRuleCidrInput interface { + pulumi.Input + + ToIpRestrictionsRuleCidrOutput() IpRestrictionsRuleCidrOutput + ToIpRestrictionsRuleCidrOutputWithContext(context.Context) IpRestrictionsRuleCidrOutput +} + +type IpRestrictionsRuleCidrArgs struct { + // IP CIDR range (can be IPv4 or IPv6) + Cidr pulumi.StringPtrInput `pulumi:"cidr"` + // IPv6 CIDR range (read-only) + CidrIpv6 pulumi.StringPtrInput `pulumi:"cidrIpv6"` + // ID of the CIDR range + Id pulumi.IntPtrInput `pulumi:"id"` + // ID of the IP restriction rule + IpRestrictionRuleId pulumi.IntPtrInput `pulumi:"ipRestrictionRuleId"` +} + +func (IpRestrictionsRuleCidrArgs) ElementType() reflect.Type { + return reflect.TypeOf((*IpRestrictionsRuleCidr)(nil)).Elem() +} + +func (i IpRestrictionsRuleCidrArgs) ToIpRestrictionsRuleCidrOutput() IpRestrictionsRuleCidrOutput { + return i.ToIpRestrictionsRuleCidrOutputWithContext(context.Background()) +} + +func (i IpRestrictionsRuleCidrArgs) ToIpRestrictionsRuleCidrOutputWithContext(ctx context.Context) IpRestrictionsRuleCidrOutput { + return pulumi.ToOutputWithContext(ctx, i).(IpRestrictionsRuleCidrOutput) +} + +// IpRestrictionsRuleCidrArrayInput is an input type that accepts IpRestrictionsRuleCidrArray and IpRestrictionsRuleCidrArrayOutput values. +// You can construct a concrete instance of `IpRestrictionsRuleCidrArrayInput` via: +// +// IpRestrictionsRuleCidrArray{ IpRestrictionsRuleCidrArgs{...} } +type IpRestrictionsRuleCidrArrayInput interface { + pulumi.Input + + ToIpRestrictionsRuleCidrArrayOutput() IpRestrictionsRuleCidrArrayOutput + ToIpRestrictionsRuleCidrArrayOutputWithContext(context.Context) IpRestrictionsRuleCidrArrayOutput +} + +type IpRestrictionsRuleCidrArray []IpRestrictionsRuleCidrInput + +func (IpRestrictionsRuleCidrArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]IpRestrictionsRuleCidr)(nil)).Elem() +} + +func (i IpRestrictionsRuleCidrArray) ToIpRestrictionsRuleCidrArrayOutput() IpRestrictionsRuleCidrArrayOutput { + return i.ToIpRestrictionsRuleCidrArrayOutputWithContext(context.Background()) +} + +func (i IpRestrictionsRuleCidrArray) ToIpRestrictionsRuleCidrArrayOutputWithContext(ctx context.Context) IpRestrictionsRuleCidrArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(IpRestrictionsRuleCidrArrayOutput) +} + +type IpRestrictionsRuleCidrOutput struct{ *pulumi.OutputState } + +func (IpRestrictionsRuleCidrOutput) ElementType() reflect.Type { + return reflect.TypeOf((*IpRestrictionsRuleCidr)(nil)).Elem() +} + +func (o IpRestrictionsRuleCidrOutput) ToIpRestrictionsRuleCidrOutput() IpRestrictionsRuleCidrOutput { + return o +} + +func (o IpRestrictionsRuleCidrOutput) ToIpRestrictionsRuleCidrOutputWithContext(ctx context.Context) IpRestrictionsRuleCidrOutput { + return o +} + +// IP CIDR range (can be IPv4 or IPv6) +func (o IpRestrictionsRuleCidrOutput) Cidr() pulumi.StringPtrOutput { + return o.ApplyT(func(v IpRestrictionsRuleCidr) *string { return v.Cidr }).(pulumi.StringPtrOutput) +} + +// IPv6 CIDR range (read-only) +func (o IpRestrictionsRuleCidrOutput) CidrIpv6() pulumi.StringPtrOutput { + return o.ApplyT(func(v IpRestrictionsRuleCidr) *string { return v.CidrIpv6 }).(pulumi.StringPtrOutput) +} + +// ID of the CIDR range +func (o IpRestrictionsRuleCidrOutput) Id() pulumi.IntPtrOutput { + return o.ApplyT(func(v IpRestrictionsRuleCidr) *int { return v.Id }).(pulumi.IntPtrOutput) +} + +// ID of the IP restriction rule +func (o IpRestrictionsRuleCidrOutput) IpRestrictionRuleId() pulumi.IntPtrOutput { + return o.ApplyT(func(v IpRestrictionsRuleCidr) *int { return v.IpRestrictionRuleId }).(pulumi.IntPtrOutput) +} + +type IpRestrictionsRuleCidrArrayOutput struct{ *pulumi.OutputState } + +func (IpRestrictionsRuleCidrArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]IpRestrictionsRuleCidr)(nil)).Elem() +} + +func (o IpRestrictionsRuleCidrArrayOutput) ToIpRestrictionsRuleCidrArrayOutput() IpRestrictionsRuleCidrArrayOutput { + return o +} + +func (o IpRestrictionsRuleCidrArrayOutput) ToIpRestrictionsRuleCidrArrayOutputWithContext(ctx context.Context) IpRestrictionsRuleCidrArrayOutput { + return o +} + +func (o IpRestrictionsRuleCidrArrayOutput) Index(i pulumi.IntInput) IpRestrictionsRuleCidrOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) IpRestrictionsRuleCidr { + return vs[0].([]IpRestrictionsRuleCidr)[vs[1].(int)] + }).(IpRestrictionsRuleCidrOutput) +} + type JobJobCompletionTriggerCondition struct { // The ID of the job that would trigger this job after completion. JobId int `pulumi:"jobId"` @@ -7051,6 +7175,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GroupGroupPermissionArrayInput)(nil)).Elem(), GroupGroupPermissionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GroupPartialPermissionsGroupPermissionInput)(nil)).Elem(), GroupPartialPermissionsGroupPermissionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GroupPartialPermissionsGroupPermissionArrayInput)(nil)).Elem(), GroupPartialPermissionsGroupPermissionArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*IpRestrictionsRuleCidrInput)(nil)).Elem(), IpRestrictionsRuleCidrArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*IpRestrictionsRuleCidrArrayInput)(nil)).Elem(), IpRestrictionsRuleCidrArray{}) pulumi.RegisterInputType(reflect.TypeOf((*JobJobCompletionTriggerConditionInput)(nil)).Elem(), JobJobCompletionTriggerConditionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*JobJobCompletionTriggerConditionPtrInput)(nil)).Elem(), JobJobCompletionTriggerConditionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ServiceTokenServiceTokenPermissionInput)(nil)).Elem(), ServiceTokenServiceTokenPermissionArgs{}) @@ -7122,6 +7248,8 @@ func init() { pulumi.RegisterOutputType(GroupGroupPermissionArrayOutput{}) pulumi.RegisterOutputType(GroupPartialPermissionsGroupPermissionOutput{}) pulumi.RegisterOutputType(GroupPartialPermissionsGroupPermissionArrayOutput{}) + pulumi.RegisterOutputType(IpRestrictionsRuleCidrOutput{}) + pulumi.RegisterOutputType(IpRestrictionsRuleCidrArrayOutput{}) pulumi.RegisterOutputType(JobJobCompletionTriggerConditionOutput{}) pulumi.RegisterOutputType(JobJobCompletionTriggerConditionPtrOutput{}) pulumi.RegisterOutputType(ServiceTokenServiceTokenPermissionOutput{}) diff --git a/sdk/java/src/main/java/com/pulumi/dbtcloud/AccountFeatures.java b/sdk/java/src/main/java/com/pulumi/dbtcloud/AccountFeatures.java new file mode 100644 index 0000000..c867315 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dbtcloud/AccountFeatures.java @@ -0,0 +1,122 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dbtcloud; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dbtcloud.AccountFeaturesArgs; +import com.pulumi.dbtcloud.Utilities; +import com.pulumi.dbtcloud.inputs.AccountFeaturesState; +import java.lang.Boolean; +import javax.annotation.Nullable; + +/** + * Manages dbt Cloud global features at the account level, like Advanced CI. The same feature should not be configured in different resources to avoid conflicts. + * + * When destroying the resource or removing the value for an attribute, the features status will not be changed. Deactivating features will require applying them wih the value set to `false`. + * + */ +@ResourceType(type="dbtcloud:index/accountFeatures:AccountFeatures") +public class AccountFeatures extends com.pulumi.resources.CustomResource { + /** + * Whether advanced CI is enabled. + * + */ + @Export(name="advancedCi", refs={Boolean.class}, tree="[0]") + private Output advancedCi; + + /** + * @return Whether advanced CI is enabled. + * + */ + public Output advancedCi() { + return this.advancedCi; + } + /** + * Whether partial parsing is enabled. + * + */ + @Export(name="partialParsing", refs={Boolean.class}, tree="[0]") + private Output partialParsing; + + /** + * @return Whether partial parsing is enabled. + * + */ + public Output partialParsing() { + return this.partialParsing; + } + /** + * Whether repository caching is enabled. + * + */ + @Export(name="repoCaching", refs={Boolean.class}, tree="[0]") + private Output repoCaching; + + /** + * @return Whether repository caching is enabled. + * + */ + public Output repoCaching() { + return this.repoCaching; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public AccountFeatures(java.lang.String name) { + this(name, AccountFeaturesArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public AccountFeatures(java.lang.String name, @Nullable AccountFeaturesArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public AccountFeatures(java.lang.String name, @Nullable AccountFeaturesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("dbtcloud:index/accountFeatures:AccountFeatures", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); + } + + private AccountFeatures(java.lang.String name, Output id, @Nullable AccountFeaturesState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("dbtcloud:index/accountFeatures:AccountFeatures", name, state, makeResourceOptions(options, id), false); + } + + private static AccountFeaturesArgs makeArgs(@Nullable AccountFeaturesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? AccountFeaturesArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static AccountFeatures get(java.lang.String name, Output id, @Nullable AccountFeaturesState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new AccountFeatures(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dbtcloud/AccountFeaturesArgs.java b/sdk/java/src/main/java/com/pulumi/dbtcloud/AccountFeaturesArgs.java new file mode 100644 index 0000000..788b961 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dbtcloud/AccountFeaturesArgs.java @@ -0,0 +1,157 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dbtcloud; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class AccountFeaturesArgs extends com.pulumi.resources.ResourceArgs { + + public static final AccountFeaturesArgs Empty = new AccountFeaturesArgs(); + + /** + * Whether advanced CI is enabled. + * + */ + @Import(name="advancedCi") + private @Nullable Output advancedCi; + + /** + * @return Whether advanced CI is enabled. + * + */ + public Optional> advancedCi() { + return Optional.ofNullable(this.advancedCi); + } + + /** + * Whether partial parsing is enabled. + * + */ + @Import(name="partialParsing") + private @Nullable Output partialParsing; + + /** + * @return Whether partial parsing is enabled. + * + */ + public Optional> partialParsing() { + return Optional.ofNullable(this.partialParsing); + } + + /** + * Whether repository caching is enabled. + * + */ + @Import(name="repoCaching") + private @Nullable Output repoCaching; + + /** + * @return Whether repository caching is enabled. + * + */ + public Optional> repoCaching() { + return Optional.ofNullable(this.repoCaching); + } + + private AccountFeaturesArgs() {} + + private AccountFeaturesArgs(AccountFeaturesArgs $) { + this.advancedCi = $.advancedCi; + this.partialParsing = $.partialParsing; + this.repoCaching = $.repoCaching; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(AccountFeaturesArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private AccountFeaturesArgs $; + + public Builder() { + $ = new AccountFeaturesArgs(); + } + + public Builder(AccountFeaturesArgs defaults) { + $ = new AccountFeaturesArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param advancedCi Whether advanced CI is enabled. + * + * @return builder + * + */ + public Builder advancedCi(@Nullable Output advancedCi) { + $.advancedCi = advancedCi; + return this; + } + + /** + * @param advancedCi Whether advanced CI is enabled. + * + * @return builder + * + */ + public Builder advancedCi(Boolean advancedCi) { + return advancedCi(Output.of(advancedCi)); + } + + /** + * @param partialParsing Whether partial parsing is enabled. + * + * @return builder + * + */ + public Builder partialParsing(@Nullable Output partialParsing) { + $.partialParsing = partialParsing; + return this; + } + + /** + * @param partialParsing Whether partial parsing is enabled. + * + * @return builder + * + */ + public Builder partialParsing(Boolean partialParsing) { + return partialParsing(Output.of(partialParsing)); + } + + /** + * @param repoCaching Whether repository caching is enabled. + * + * @return builder + * + */ + public Builder repoCaching(@Nullable Output repoCaching) { + $.repoCaching = repoCaching; + return this; + } + + /** + * @param repoCaching Whether repository caching is enabled. + * + * @return builder + * + */ + public Builder repoCaching(Boolean repoCaching) { + return repoCaching(Output.of(repoCaching)); + } + + public AccountFeaturesArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dbtcloud/IpRestrictionsRule.java b/sdk/java/src/main/java/com/pulumi/dbtcloud/IpRestrictionsRule.java new file mode 100644 index 0000000..2fe4de9 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dbtcloud/IpRestrictionsRule.java @@ -0,0 +1,228 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dbtcloud; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dbtcloud.IpRestrictionsRuleArgs; +import com.pulumi.dbtcloud.Utilities; +import com.pulumi.dbtcloud.inputs.IpRestrictionsRuleState; +import com.pulumi.dbtcloud.outputs.IpRestrictionsRuleCidr; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +/** + * Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.dbtcloud.IpRestrictionsRule;
+ * import com.pulumi.dbtcloud.IpRestrictionsRuleArgs;
+ * import com.pulumi.dbtcloud.inputs.IpRestrictionsRuleCidrArgs;
+ * import java.util.List;
+ * import java.util.ArrayList;
+ * import java.util.Map;
+ * import java.io.File;
+ * import java.nio.file.Files;
+ * import java.nio.file.Paths;
+ * 
+ * public class App {
+ *     public static void main(String[] args) {
+ *         Pulumi.run(App::stack);
+ *     }
+ * 
+ *     public static void stack(Context ctx) {
+ *         var test = new IpRestrictionsRule("test", IpRestrictionsRuleArgs.builder()
+ *             .name("My restriction rule")
+ *             .description("Important description")
+ *             .cidrs(            
+ *                 IpRestrictionsRuleCidrArgs.builder()
+ *                     .cidr("::ffff:106:708")
+ *                     .build(),
+ *                 IpRestrictionsRuleCidrArgs.builder()
+ *                     .cidr("1.6.7.10/24")
+ *                     .build())
+ *             .type("deny")
+ *             .ruleSetEnabled(false)
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * <!--End PulumiCodeChooser --> + * + * ## Import + * + * using import blocks (requires Terraform >= 1.5) + * + * import { + * + * to = dbtcloud_ip_restrictions_rule.my_rule + * + * id = "ip_restriction_rule_id" + * + * } + * + * import { + * + * to = dbtcloud_ip_restrictions_rule.my_rule + * + * id = "12345" + * + * } + * + * using the older import command + * + * ```sh + * $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule "ip_restriction_rule_id" + * ``` + * + * ```sh + * $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule 12345 + * ``` + * + */ +@ResourceType(type="dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule") +public class IpRestrictionsRule extends com.pulumi.resources.CustomResource { + /** + * Set of CIDR ranges for this rule + * + */ + @Export(name="cidrs", refs={List.class,IpRestrictionsRuleCidr.class}, tree="[0,1]") + private Output> cidrs; + + /** + * @return Set of CIDR ranges for this rule + * + */ + public Output> cidrs() { + return this.cidrs; + } + /** + * A description of the IP restriction rule + * + */ + @Export(name="description", refs={String.class}, tree="[0]") + private Output description; + + /** + * @return A description of the IP restriction rule + * + */ + public Output> description() { + return Codegen.optional(this.description); + } + /** + * The name of the IP restriction rule + * + */ + @Export(name="name", refs={String.class}, tree="[0]") + private Output name; + + /** + * @return The name of the IP restriction rule + * + */ + public Output name() { + return this.name; + } + /** + * Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + */ + @Export(name="ruleSetEnabled", refs={Boolean.class}, tree="[0]") + private Output ruleSetEnabled; + + /** + * @return Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + */ + public Output ruleSetEnabled() { + return this.ruleSetEnabled; + } + /** + * The type of the IP restriction rule (allow or deny) + * + */ + @Export(name="type", refs={String.class}, tree="[0]") + private Output type; + + /** + * @return The type of the IP restriction rule (allow or deny) + * + */ + public Output type() { + return this.type; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public IpRestrictionsRule(java.lang.String name) { + this(name, IpRestrictionsRuleArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public IpRestrictionsRule(java.lang.String name, IpRestrictionsRuleArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public IpRestrictionsRule(java.lang.String name, IpRestrictionsRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); + } + + private IpRestrictionsRule(java.lang.String name, Output id, @Nullable IpRestrictionsRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule", name, state, makeResourceOptions(options, id), false); + } + + private static IpRestrictionsRuleArgs makeArgs(IpRestrictionsRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? IpRestrictionsRuleArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static IpRestrictionsRule get(java.lang.String name, Output id, @Nullable IpRestrictionsRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new IpRestrictionsRule(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dbtcloud/IpRestrictionsRuleArgs.java b/sdk/java/src/main/java/com/pulumi/dbtcloud/IpRestrictionsRuleArgs.java new file mode 100644 index 0000000..681e40e --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dbtcloud/IpRestrictionsRuleArgs.java @@ -0,0 +1,254 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dbtcloud; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.dbtcloud.inputs.IpRestrictionsRuleCidrArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class IpRestrictionsRuleArgs extends com.pulumi.resources.ResourceArgs { + + public static final IpRestrictionsRuleArgs Empty = new IpRestrictionsRuleArgs(); + + /** + * Set of CIDR ranges for this rule + * + */ + @Import(name="cidrs", required=true) + private Output> cidrs; + + /** + * @return Set of CIDR ranges for this rule + * + */ + public Output> cidrs() { + return this.cidrs; + } + + /** + * A description of the IP restriction rule + * + */ + @Import(name="description") + private @Nullable Output description; + + /** + * @return A description of the IP restriction rule + * + */ + public Optional> description() { + return Optional.ofNullable(this.description); + } + + /** + * The name of the IP restriction rule + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return The name of the IP restriction rule + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + */ + @Import(name="ruleSetEnabled", required=true) + private Output ruleSetEnabled; + + /** + * @return Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + */ + public Output ruleSetEnabled() { + return this.ruleSetEnabled; + } + + /** + * The type of the IP restriction rule (allow or deny) + * + */ + @Import(name="type", required=true) + private Output type; + + /** + * @return The type of the IP restriction rule (allow or deny) + * + */ + public Output type() { + return this.type; + } + + private IpRestrictionsRuleArgs() {} + + private IpRestrictionsRuleArgs(IpRestrictionsRuleArgs $) { + this.cidrs = $.cidrs; + this.description = $.description; + this.name = $.name; + this.ruleSetEnabled = $.ruleSetEnabled; + this.type = $.type; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(IpRestrictionsRuleArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private IpRestrictionsRuleArgs $; + + public Builder() { + $ = new IpRestrictionsRuleArgs(); + } + + public Builder(IpRestrictionsRuleArgs defaults) { + $ = new IpRestrictionsRuleArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param cidrs Set of CIDR ranges for this rule + * + * @return builder + * + */ + public Builder cidrs(Output> cidrs) { + $.cidrs = cidrs; + return this; + } + + /** + * @param cidrs Set of CIDR ranges for this rule + * + * @return builder + * + */ + public Builder cidrs(List cidrs) { + return cidrs(Output.of(cidrs)); + } + + /** + * @param cidrs Set of CIDR ranges for this rule + * + * @return builder + * + */ + public Builder cidrs(IpRestrictionsRuleCidrArgs... cidrs) { + return cidrs(List.of(cidrs)); + } + + /** + * @param description A description of the IP restriction rule + * + * @return builder + * + */ + public Builder description(@Nullable Output description) { + $.description = description; + return this; + } + + /** + * @param description A description of the IP restriction rule + * + * @return builder + * + */ + public Builder description(String description) { + return description(Output.of(description)); + } + + /** + * @param name The name of the IP restriction rule + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name The name of the IP restriction rule + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param ruleSetEnabled Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + * @return builder + * + */ + public Builder ruleSetEnabled(Output ruleSetEnabled) { + $.ruleSetEnabled = ruleSetEnabled; + return this; + } + + /** + * @param ruleSetEnabled Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + * @return builder + * + */ + public Builder ruleSetEnabled(Boolean ruleSetEnabled) { + return ruleSetEnabled(Output.of(ruleSetEnabled)); + } + + /** + * @param type The type of the IP restriction rule (allow or deny) + * + * @return builder + * + */ + public Builder type(Output type) { + $.type = type; + return this; + } + + /** + * @param type The type of the IP restriction rule (allow or deny) + * + * @return builder + * + */ + public Builder type(String type) { + return type(Output.of(type)); + } + + public IpRestrictionsRuleArgs build() { + if ($.cidrs == null) { + throw new MissingRequiredPropertyException("IpRestrictionsRuleArgs", "cidrs"); + } + if ($.ruleSetEnabled == null) { + throw new MissingRequiredPropertyException("IpRestrictionsRuleArgs", "ruleSetEnabled"); + } + if ($.type == null) { + throw new MissingRequiredPropertyException("IpRestrictionsRuleArgs", "type"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/AccountFeaturesState.java b/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/AccountFeaturesState.java new file mode 100644 index 0000000..b291a4a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/AccountFeaturesState.java @@ -0,0 +1,157 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dbtcloud.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Boolean; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class AccountFeaturesState extends com.pulumi.resources.ResourceArgs { + + public static final AccountFeaturesState Empty = new AccountFeaturesState(); + + /** + * Whether advanced CI is enabled. + * + */ + @Import(name="advancedCi") + private @Nullable Output advancedCi; + + /** + * @return Whether advanced CI is enabled. + * + */ + public Optional> advancedCi() { + return Optional.ofNullable(this.advancedCi); + } + + /** + * Whether partial parsing is enabled. + * + */ + @Import(name="partialParsing") + private @Nullable Output partialParsing; + + /** + * @return Whether partial parsing is enabled. + * + */ + public Optional> partialParsing() { + return Optional.ofNullable(this.partialParsing); + } + + /** + * Whether repository caching is enabled. + * + */ + @Import(name="repoCaching") + private @Nullable Output repoCaching; + + /** + * @return Whether repository caching is enabled. + * + */ + public Optional> repoCaching() { + return Optional.ofNullable(this.repoCaching); + } + + private AccountFeaturesState() {} + + private AccountFeaturesState(AccountFeaturesState $) { + this.advancedCi = $.advancedCi; + this.partialParsing = $.partialParsing; + this.repoCaching = $.repoCaching; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(AccountFeaturesState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private AccountFeaturesState $; + + public Builder() { + $ = new AccountFeaturesState(); + } + + public Builder(AccountFeaturesState defaults) { + $ = new AccountFeaturesState(Objects.requireNonNull(defaults)); + } + + /** + * @param advancedCi Whether advanced CI is enabled. + * + * @return builder + * + */ + public Builder advancedCi(@Nullable Output advancedCi) { + $.advancedCi = advancedCi; + return this; + } + + /** + * @param advancedCi Whether advanced CI is enabled. + * + * @return builder + * + */ + public Builder advancedCi(Boolean advancedCi) { + return advancedCi(Output.of(advancedCi)); + } + + /** + * @param partialParsing Whether partial parsing is enabled. + * + * @return builder + * + */ + public Builder partialParsing(@Nullable Output partialParsing) { + $.partialParsing = partialParsing; + return this; + } + + /** + * @param partialParsing Whether partial parsing is enabled. + * + * @return builder + * + */ + public Builder partialParsing(Boolean partialParsing) { + return partialParsing(Output.of(partialParsing)); + } + + /** + * @param repoCaching Whether repository caching is enabled. + * + * @return builder + * + */ + public Builder repoCaching(@Nullable Output repoCaching) { + $.repoCaching = repoCaching; + return this; + } + + /** + * @param repoCaching Whether repository caching is enabled. + * + * @return builder + * + */ + public Builder repoCaching(Boolean repoCaching) { + return repoCaching(Output.of(repoCaching)); + } + + public AccountFeaturesState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/IpRestrictionsRuleCidrArgs.java b/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/IpRestrictionsRuleCidrArgs.java new file mode 100644 index 0000000..6badf73 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/IpRestrictionsRuleCidrArgs.java @@ -0,0 +1,195 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dbtcloud.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class IpRestrictionsRuleCidrArgs extends com.pulumi.resources.ResourceArgs { + + public static final IpRestrictionsRuleCidrArgs Empty = new IpRestrictionsRuleCidrArgs(); + + /** + * IP CIDR range (can be IPv4 or IPv6) + * + */ + @Import(name="cidr") + private @Nullable Output cidr; + + /** + * @return IP CIDR range (can be IPv4 or IPv6) + * + */ + public Optional> cidr() { + return Optional.ofNullable(this.cidr); + } + + /** + * IPv6 CIDR range (read-only) + * + */ + @Import(name="cidrIpv6") + private @Nullable Output cidrIpv6; + + /** + * @return IPv6 CIDR range (read-only) + * + */ + public Optional> cidrIpv6() { + return Optional.ofNullable(this.cidrIpv6); + } + + /** + * ID of the CIDR range + * + */ + @Import(name="id") + private @Nullable Output id; + + /** + * @return ID of the CIDR range + * + */ + public Optional> id() { + return Optional.ofNullable(this.id); + } + + /** + * ID of the IP restriction rule + * + */ + @Import(name="ipRestrictionRuleId") + private @Nullable Output ipRestrictionRuleId; + + /** + * @return ID of the IP restriction rule + * + */ + public Optional> ipRestrictionRuleId() { + return Optional.ofNullable(this.ipRestrictionRuleId); + } + + private IpRestrictionsRuleCidrArgs() {} + + private IpRestrictionsRuleCidrArgs(IpRestrictionsRuleCidrArgs $) { + this.cidr = $.cidr; + this.cidrIpv6 = $.cidrIpv6; + this.id = $.id; + this.ipRestrictionRuleId = $.ipRestrictionRuleId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(IpRestrictionsRuleCidrArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private IpRestrictionsRuleCidrArgs $; + + public Builder() { + $ = new IpRestrictionsRuleCidrArgs(); + } + + public Builder(IpRestrictionsRuleCidrArgs defaults) { + $ = new IpRestrictionsRuleCidrArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param cidr IP CIDR range (can be IPv4 or IPv6) + * + * @return builder + * + */ + public Builder cidr(@Nullable Output cidr) { + $.cidr = cidr; + return this; + } + + /** + * @param cidr IP CIDR range (can be IPv4 or IPv6) + * + * @return builder + * + */ + public Builder cidr(String cidr) { + return cidr(Output.of(cidr)); + } + + /** + * @param cidrIpv6 IPv6 CIDR range (read-only) + * + * @return builder + * + */ + public Builder cidrIpv6(@Nullable Output cidrIpv6) { + $.cidrIpv6 = cidrIpv6; + return this; + } + + /** + * @param cidrIpv6 IPv6 CIDR range (read-only) + * + * @return builder + * + */ + public Builder cidrIpv6(String cidrIpv6) { + return cidrIpv6(Output.of(cidrIpv6)); + } + + /** + * @param id ID of the CIDR range + * + * @return builder + * + */ + public Builder id(@Nullable Output id) { + $.id = id; + return this; + } + + /** + * @param id ID of the CIDR range + * + * @return builder + * + */ + public Builder id(Integer id) { + return id(Output.of(id)); + } + + /** + * @param ipRestrictionRuleId ID of the IP restriction rule + * + * @return builder + * + */ + public Builder ipRestrictionRuleId(@Nullable Output ipRestrictionRuleId) { + $.ipRestrictionRuleId = ipRestrictionRuleId; + return this; + } + + /** + * @param ipRestrictionRuleId ID of the IP restriction rule + * + * @return builder + * + */ + public Builder ipRestrictionRuleId(Integer ipRestrictionRuleId) { + return ipRestrictionRuleId(Output.of(ipRestrictionRuleId)); + } + + public IpRestrictionsRuleCidrArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/IpRestrictionsRuleState.java b/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/IpRestrictionsRuleState.java new file mode 100644 index 0000000..4564946 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dbtcloud/inputs/IpRestrictionsRuleState.java @@ -0,0 +1,244 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dbtcloud.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.dbtcloud.inputs.IpRestrictionsRuleCidrArgs; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class IpRestrictionsRuleState extends com.pulumi.resources.ResourceArgs { + + public static final IpRestrictionsRuleState Empty = new IpRestrictionsRuleState(); + + /** + * Set of CIDR ranges for this rule + * + */ + @Import(name="cidrs") + private @Nullable Output> cidrs; + + /** + * @return Set of CIDR ranges for this rule + * + */ + public Optional>> cidrs() { + return Optional.ofNullable(this.cidrs); + } + + /** + * A description of the IP restriction rule + * + */ + @Import(name="description") + private @Nullable Output description; + + /** + * @return A description of the IP restriction rule + * + */ + public Optional> description() { + return Optional.ofNullable(this.description); + } + + /** + * The name of the IP restriction rule + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return The name of the IP restriction rule + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + */ + @Import(name="ruleSetEnabled") + private @Nullable Output ruleSetEnabled; + + /** + * @return Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + */ + public Optional> ruleSetEnabled() { + return Optional.ofNullable(this.ruleSetEnabled); + } + + /** + * The type of the IP restriction rule (allow or deny) + * + */ + @Import(name="type") + private @Nullable Output type; + + /** + * @return The type of the IP restriction rule (allow or deny) + * + */ + public Optional> type() { + return Optional.ofNullable(this.type); + } + + private IpRestrictionsRuleState() {} + + private IpRestrictionsRuleState(IpRestrictionsRuleState $) { + this.cidrs = $.cidrs; + this.description = $.description; + this.name = $.name; + this.ruleSetEnabled = $.ruleSetEnabled; + this.type = $.type; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(IpRestrictionsRuleState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private IpRestrictionsRuleState $; + + public Builder() { + $ = new IpRestrictionsRuleState(); + } + + public Builder(IpRestrictionsRuleState defaults) { + $ = new IpRestrictionsRuleState(Objects.requireNonNull(defaults)); + } + + /** + * @param cidrs Set of CIDR ranges for this rule + * + * @return builder + * + */ + public Builder cidrs(@Nullable Output> cidrs) { + $.cidrs = cidrs; + return this; + } + + /** + * @param cidrs Set of CIDR ranges for this rule + * + * @return builder + * + */ + public Builder cidrs(List cidrs) { + return cidrs(Output.of(cidrs)); + } + + /** + * @param cidrs Set of CIDR ranges for this rule + * + * @return builder + * + */ + public Builder cidrs(IpRestrictionsRuleCidrArgs... cidrs) { + return cidrs(List.of(cidrs)); + } + + /** + * @param description A description of the IP restriction rule + * + * @return builder + * + */ + public Builder description(@Nullable Output description) { + $.description = description; + return this; + } + + /** + * @param description A description of the IP restriction rule + * + * @return builder + * + */ + public Builder description(String description) { + return description(Output.of(description)); + } + + /** + * @param name The name of the IP restriction rule + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name The name of the IP restriction rule + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param ruleSetEnabled Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + * @return builder + * + */ + public Builder ruleSetEnabled(@Nullable Output ruleSetEnabled) { + $.ruleSetEnabled = ruleSetEnabled; + return this; + } + + /** + * @param ruleSetEnabled Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + * + * @return builder + * + */ + public Builder ruleSetEnabled(Boolean ruleSetEnabled) { + return ruleSetEnabled(Output.of(ruleSetEnabled)); + } + + /** + * @param type The type of the IP restriction rule (allow or deny) + * + * @return builder + * + */ + public Builder type(@Nullable Output type) { + $.type = type; + return this; + } + + /** + * @param type The type of the IP restriction rule (allow or deny) + * + * @return builder + * + */ + public Builder type(String type) { + return type(Output.of(type)); + } + + public IpRestrictionsRuleState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dbtcloud/outputs/IpRestrictionsRuleCidr.java b/sdk/java/src/main/java/com/pulumi/dbtcloud/outputs/IpRestrictionsRuleCidr.java new file mode 100644 index 0000000..50d3e36 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dbtcloud/outputs/IpRestrictionsRuleCidr.java @@ -0,0 +1,121 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dbtcloud.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class IpRestrictionsRuleCidr { + /** + * @return IP CIDR range (can be IPv4 or IPv6) + * + */ + private @Nullable String cidr; + /** + * @return IPv6 CIDR range (read-only) + * + */ + private @Nullable String cidrIpv6; + /** + * @return ID of the CIDR range + * + */ + private @Nullable Integer id; + /** + * @return ID of the IP restriction rule + * + */ + private @Nullable Integer ipRestrictionRuleId; + + private IpRestrictionsRuleCidr() {} + /** + * @return IP CIDR range (can be IPv4 or IPv6) + * + */ + public Optional cidr() { + return Optional.ofNullable(this.cidr); + } + /** + * @return IPv6 CIDR range (read-only) + * + */ + public Optional cidrIpv6() { + return Optional.ofNullable(this.cidrIpv6); + } + /** + * @return ID of the CIDR range + * + */ + public Optional id() { + return Optional.ofNullable(this.id); + } + /** + * @return ID of the IP restriction rule + * + */ + public Optional ipRestrictionRuleId() { + return Optional.ofNullable(this.ipRestrictionRuleId); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(IpRestrictionsRuleCidr defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String cidr; + private @Nullable String cidrIpv6; + private @Nullable Integer id; + private @Nullable Integer ipRestrictionRuleId; + public Builder() {} + public Builder(IpRestrictionsRuleCidr defaults) { + Objects.requireNonNull(defaults); + this.cidr = defaults.cidr; + this.cidrIpv6 = defaults.cidrIpv6; + this.id = defaults.id; + this.ipRestrictionRuleId = defaults.ipRestrictionRuleId; + } + + @CustomType.Setter + public Builder cidr(@Nullable String cidr) { + + this.cidr = cidr; + return this; + } + @CustomType.Setter + public Builder cidrIpv6(@Nullable String cidrIpv6) { + + this.cidrIpv6 = cidrIpv6; + return this; + } + @CustomType.Setter + public Builder id(@Nullable Integer id) { + + this.id = id; + return this; + } + @CustomType.Setter + public Builder ipRestrictionRuleId(@Nullable Integer ipRestrictionRuleId) { + + this.ipRestrictionRuleId = ipRestrictionRuleId; + return this; + } + public IpRestrictionsRuleCidr build() { + final var _resultValue = new IpRestrictionsRuleCidr(); + _resultValue.cidr = cidr; + _resultValue.cidrIpv6 = cidrIpv6; + _resultValue.id = id; + _resultValue.ipRestrictionRuleId = ipRestrictionRuleId; + return _resultValue; + } + } +} diff --git a/sdk/nodejs/accountFeatures.ts b/sdk/nodejs/accountFeatures.ts new file mode 100644 index 0000000..8a4743c --- /dev/null +++ b/sdk/nodejs/accountFeatures.ts @@ -0,0 +1,114 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * Manages dbt Cloud global features at the account level, like Advanced CI. The same feature should not be configured in different resources to avoid conflicts. + * + * When destroying the resource or removing the value for an attribute, the features status will not be changed. Deactivating features will require applying them wih the value set to `false`. + */ +export class AccountFeatures extends pulumi.CustomResource { + /** + * Get an existing AccountFeatures resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: AccountFeaturesState, opts?: pulumi.CustomResourceOptions): AccountFeatures { + return new AccountFeatures(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'dbtcloud:index/accountFeatures:AccountFeatures'; + + /** + * Returns true if the given object is an instance of AccountFeatures. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is AccountFeatures { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === AccountFeatures.__pulumiType; + } + + /** + * Whether advanced CI is enabled. + */ + public readonly advancedCi!: pulumi.Output; + /** + * Whether partial parsing is enabled. + */ + public readonly partialParsing!: pulumi.Output; + /** + * Whether repository caching is enabled. + */ + public readonly repoCaching!: pulumi.Output; + + /** + * Create a AccountFeatures resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args?: AccountFeaturesArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: AccountFeaturesArgs | AccountFeaturesState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as AccountFeaturesState | undefined; + resourceInputs["advancedCi"] = state ? state.advancedCi : undefined; + resourceInputs["partialParsing"] = state ? state.partialParsing : undefined; + resourceInputs["repoCaching"] = state ? state.repoCaching : undefined; + } else { + const args = argsOrState as AccountFeaturesArgs | undefined; + resourceInputs["advancedCi"] = args ? args.advancedCi : undefined; + resourceInputs["partialParsing"] = args ? args.partialParsing : undefined; + resourceInputs["repoCaching"] = args ? args.repoCaching : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(AccountFeatures.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering AccountFeatures resources. + */ +export interface AccountFeaturesState { + /** + * Whether advanced CI is enabled. + */ + advancedCi?: pulumi.Input; + /** + * Whether partial parsing is enabled. + */ + partialParsing?: pulumi.Input; + /** + * Whether repository caching is enabled. + */ + repoCaching?: pulumi.Input; +} + +/** + * The set of arguments for constructing a AccountFeatures resource. + */ +export interface AccountFeaturesArgs { + /** + * Whether advanced CI is enabled. + */ + advancedCi?: pulumi.Input; + /** + * Whether partial parsing is enabled. + */ + partialParsing?: pulumi.Input; + /** + * Whether repository caching is enabled. + */ + repoCaching?: pulumi.Input; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index d477edf..3e1038a 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -5,6 +5,11 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; // Export members: +export { AccountFeaturesArgs, AccountFeaturesState } from "./accountFeatures"; +export type AccountFeatures = import("./accountFeatures").AccountFeatures; +export const AccountFeatures: typeof import("./accountFeatures").AccountFeatures = null as any; +utilities.lazyLoad(exports, ["AccountFeatures"], () => require("./accountFeatures")); + export { BigQueryConnectionArgs, BigQueryConnectionState } from "./bigQueryConnection"; export type BigQueryConnection = import("./bigQueryConnection").BigQueryConnection; export const BigQueryConnection: typeof import("./bigQueryConnection").BigQueryConnection = null as any; @@ -210,6 +215,11 @@ export type GroupPartialPermissions = import("./groupPartialPermissions").GroupP export const GroupPartialPermissions: typeof import("./groupPartialPermissions").GroupPartialPermissions = null as any; utilities.lazyLoad(exports, ["GroupPartialPermissions"], () => require("./groupPartialPermissions")); +export { IpRestrictionsRuleArgs, IpRestrictionsRuleState } from "./ipRestrictionsRule"; +export type IpRestrictionsRule = import("./ipRestrictionsRule").IpRestrictionsRule; +export const IpRestrictionsRule: typeof import("./ipRestrictionsRule").IpRestrictionsRule = null as any; +utilities.lazyLoad(exports, ["IpRestrictionsRule"], () => require("./ipRestrictionsRule")); + export { JobArgs, JobState } from "./job"; export type Job = import("./job").Job; export const Job: typeof import("./job").Job = null as any; @@ -314,6 +324,8 @@ const _module = { version: utilities.getVersion(), construct: (name: string, type: string, urn: string): pulumi.Resource => { switch (type) { + case "dbtcloud:index/accountFeatures:AccountFeatures": + return new AccountFeatures(name, undefined, { urn }) case "dbtcloud:index/bigQueryConnection:BigQueryConnection": return new BigQueryConnection(name, undefined, { urn }) case "dbtcloud:index/bigQueryCredential:BigQueryCredential": @@ -340,6 +352,8 @@ const _module = { return new Group(name, undefined, { urn }) case "dbtcloud:index/groupPartialPermissions:GroupPartialPermissions": return new GroupPartialPermissions(name, undefined, { urn }) + case "dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule": + return new IpRestrictionsRule(name, undefined, { urn }) case "dbtcloud:index/job:Job": return new Job(name, undefined, { urn }) case "dbtcloud:index/licenseMap:LicenseMap": @@ -379,6 +393,7 @@ const _module = { } }, }; +pulumi.runtime.registerResourceModule("dbtcloud", "index/accountFeatures", _module) pulumi.runtime.registerResourceModule("dbtcloud", "index/bigQueryConnection", _module) pulumi.runtime.registerResourceModule("dbtcloud", "index/bigQueryCredential", _module) pulumi.runtime.registerResourceModule("dbtcloud", "index/connection", _module) @@ -392,6 +407,7 @@ pulumi.runtime.registerResourceModule("dbtcloud", "index/fabricCredential", _mod pulumi.runtime.registerResourceModule("dbtcloud", "index/globalConnection", _module) pulumi.runtime.registerResourceModule("dbtcloud", "index/group", _module) pulumi.runtime.registerResourceModule("dbtcloud", "index/groupPartialPermissions", _module) +pulumi.runtime.registerResourceModule("dbtcloud", "index/ipRestrictionsRule", _module) pulumi.runtime.registerResourceModule("dbtcloud", "index/job", _module) pulumi.runtime.registerResourceModule("dbtcloud", "index/licenseMap", _module) pulumi.runtime.registerResourceModule("dbtcloud", "index/lineageIntegration", _module) diff --git a/sdk/nodejs/ipRestrictionsRule.ts b/sdk/nodejs/ipRestrictionsRule.ts new file mode 100644 index 0000000..9f351dd --- /dev/null +++ b/sdk/nodejs/ipRestrictionsRule.ts @@ -0,0 +1,203 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as dbtcloud from "@pulumi/dbtcloud"; + * + * const test = new dbtcloud.IpRestrictionsRule("test", { + * name: "My restriction rule", + * description: "Important description", + * cidrs: [ + * { + * cidr: "::ffff:106:708", + * }, + * { + * cidr: "1.6.7.10/24", + * }, + * ], + * type: "deny", + * ruleSetEnabled: false, + * }); + * ``` + * + * ## Import + * + * using import blocks (requires Terraform >= 1.5) + * + * import { + * + * to = dbtcloud_ip_restrictions_rule.my_rule + * + * id = "ip_restriction_rule_id" + * + * } + * + * import { + * + * to = dbtcloud_ip_restrictions_rule.my_rule + * + * id = "12345" + * + * } + * + * using the older import command + * + * ```sh + * $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule "ip_restriction_rule_id" + * ``` + * + * ```sh + * $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule 12345 + * ``` + */ +export class IpRestrictionsRule extends pulumi.CustomResource { + /** + * Get an existing IpRestrictionsRule resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: IpRestrictionsRuleState, opts?: pulumi.CustomResourceOptions): IpRestrictionsRule { + return new IpRestrictionsRule(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule'; + + /** + * Returns true if the given object is an instance of IpRestrictionsRule. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is IpRestrictionsRule { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === IpRestrictionsRule.__pulumiType; + } + + /** + * Set of CIDR ranges for this rule + */ + public readonly cidrs!: pulumi.Output; + /** + * A description of the IP restriction rule + */ + public readonly description!: pulumi.Output; + /** + * The name of the IP restriction rule + */ + public readonly name!: pulumi.Output; + /** + * Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + */ + public readonly ruleSetEnabled!: pulumi.Output; + /** + * The type of the IP restriction rule (allow or deny) + */ + public readonly type!: pulumi.Output; + + /** + * Create a IpRestrictionsRule resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: IpRestrictionsRuleArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: IpRestrictionsRuleArgs | IpRestrictionsRuleState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as IpRestrictionsRuleState | undefined; + resourceInputs["cidrs"] = state ? state.cidrs : undefined; + resourceInputs["description"] = state ? state.description : undefined; + resourceInputs["name"] = state ? state.name : undefined; + resourceInputs["ruleSetEnabled"] = state ? state.ruleSetEnabled : undefined; + resourceInputs["type"] = state ? state.type : undefined; + } else { + const args = argsOrState as IpRestrictionsRuleArgs | undefined; + if ((!args || args.cidrs === undefined) && !opts.urn) { + throw new Error("Missing required property 'cidrs'"); + } + if ((!args || args.ruleSetEnabled === undefined) && !opts.urn) { + throw new Error("Missing required property 'ruleSetEnabled'"); + } + if ((!args || args.type === undefined) && !opts.urn) { + throw new Error("Missing required property 'type'"); + } + resourceInputs["cidrs"] = args ? args.cidrs : undefined; + resourceInputs["description"] = args ? args.description : undefined; + resourceInputs["name"] = args ? args.name : undefined; + resourceInputs["ruleSetEnabled"] = args ? args.ruleSetEnabled : undefined; + resourceInputs["type"] = args ? args.type : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(IpRestrictionsRule.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering IpRestrictionsRule resources. + */ +export interface IpRestrictionsRuleState { + /** + * Set of CIDR ranges for this rule + */ + cidrs?: pulumi.Input[]>; + /** + * A description of the IP restriction rule + */ + description?: pulumi.Input; + /** + * The name of the IP restriction rule + */ + name?: pulumi.Input; + /** + * Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + */ + ruleSetEnabled?: pulumi.Input; + /** + * The type of the IP restriction rule (allow or deny) + */ + type?: pulumi.Input; +} + +/** + * The set of arguments for constructing a IpRestrictionsRule resource. + */ +export interface IpRestrictionsRuleArgs { + /** + * Set of CIDR ranges for this rule + */ + cidrs: pulumi.Input[]>; + /** + * A description of the IP restriction rule + */ + description?: pulumi.Input; + /** + * The name of the IP restriction rule + */ + name?: pulumi.Input; + /** + * Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + */ + ruleSetEnabled: pulumi.Input; + /** + * The type of the IP restriction rule (allow or deny) + */ + type: pulumi.Input; +} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 7e54f36..dd1a4a7 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -13,6 +13,7 @@ "strict": true }, "files": [ + "accountFeatures.ts", "bigQueryConnection.ts", "bigQueryCredential.ts", "config/index.ts", @@ -57,6 +58,7 @@ "group.ts", "groupPartialPermissions.ts", "index.ts", + "ipRestrictionsRule.ts", "job.ts", "licenseMap.ts", "lineageIntegration.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 6a5a880..a668167 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -497,6 +497,25 @@ export interface GroupPartialPermissionsGroupPermission { writableEnvironmentCategories?: pulumi.Input[]>; } +export interface IpRestrictionsRuleCidr { + /** + * IP CIDR range (can be IPv4 or IPv6) + */ + cidr?: pulumi.Input; + /** + * IPv6 CIDR range (read-only) + */ + cidrIpv6?: pulumi.Input; + /** + * ID of the CIDR range + */ + id?: pulumi.Input; + /** + * ID of the IP restriction rule + */ + ipRestrictionRuleId?: pulumi.Input; +} + export interface JobJobCompletionTriggerCondition { /** * The ID of the job that would trigger this job after completion. diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 0f7d86b..5fd8322 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -1222,6 +1222,25 @@ export interface GroupPartialPermissionsGroupPermission { writableEnvironmentCategories?: string[]; } +export interface IpRestrictionsRuleCidr { + /** + * IP CIDR range (can be IPv4 or IPv6) + */ + cidr: string; + /** + * IPv6 CIDR range (read-only) + */ + cidrIpv6: string; + /** + * ID of the CIDR range + */ + id: number; + /** + * ID of the IP restriction rule + */ + ipRestrictionRuleId: number; +} + export interface JobJobCompletionTriggerCondition { /** * The ID of the job that would trigger this job after completion. diff --git a/sdk/python/pulumi_dbtcloud/__init__.py b/sdk/python/pulumi_dbtcloud/__init__.py index 39c9aec..681d391 100644 --- a/sdk/python/pulumi_dbtcloud/__init__.py +++ b/sdk/python/pulumi_dbtcloud/__init__.py @@ -5,6 +5,7 @@ from . import _utilities import typing # Export this package's modules as members: +from .account_features import * from .big_query_connection import * from .big_query_credential import * from .connection import * @@ -46,6 +47,7 @@ from .global_connection import * from .group import * from .group_partial_permissions import * +from .ip_restrictions_rule import * from .job import * from .license_map import * from .lineage_integration import * @@ -77,6 +79,14 @@ _utilities.register( resource_modules=""" [ + { + "pkg": "dbtcloud", + "mod": "index/accountFeatures", + "fqn": "pulumi_dbtcloud", + "classes": { + "dbtcloud:index/accountFeatures:AccountFeatures": "AccountFeatures" + } + }, { "pkg": "dbtcloud", "mod": "index/bigQueryConnection", @@ -181,6 +191,14 @@ "dbtcloud:index/groupPartialPermissions:GroupPartialPermissions": "GroupPartialPermissions" } }, + { + "pkg": "dbtcloud", + "mod": "index/ipRestrictionsRule", + "fqn": "pulumi_dbtcloud", + "classes": { + "dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule": "IpRestrictionsRule" + } + }, { "pkg": "dbtcloud", "mod": "index/job", diff --git a/sdk/python/pulumi_dbtcloud/_inputs.py b/sdk/python/pulumi_dbtcloud/_inputs.py index 69b382f..28f1668 100644 --- a/sdk/python/pulumi_dbtcloud/_inputs.py +++ b/sdk/python/pulumi_dbtcloud/_inputs.py @@ -43,6 +43,8 @@ 'GroupGroupPermissionArgsDict', 'GroupPartialPermissionsGroupPermissionArgs', 'GroupPartialPermissionsGroupPermissionArgsDict', + 'IpRestrictionsRuleCidrArgs', + 'IpRestrictionsRuleCidrArgsDict', 'JobJobCompletionTriggerConditionArgs', 'JobJobCompletionTriggerConditionArgsDict', 'ServiceTokenServiceTokenPermissionArgs', @@ -2186,6 +2188,98 @@ def writable_environment_categories(self, value: Optional[pulumi.Input[Sequence[ pulumi.set(self, "writable_environment_categories", value) +if not MYPY: + class IpRestrictionsRuleCidrArgsDict(TypedDict): + cidr: NotRequired[pulumi.Input[str]] + """ + IP CIDR range (can be IPv4 or IPv6) + """ + cidr_ipv6: NotRequired[pulumi.Input[str]] + """ + IPv6 CIDR range (read-only) + """ + id: NotRequired[pulumi.Input[int]] + """ + ID of the CIDR range + """ + ip_restriction_rule_id: NotRequired[pulumi.Input[int]] + """ + ID of the IP restriction rule + """ +elif False: + IpRestrictionsRuleCidrArgsDict: TypeAlias = Mapping[str, Any] + +@pulumi.input_type +class IpRestrictionsRuleCidrArgs: + def __init__(__self__, *, + cidr: Optional[pulumi.Input[str]] = None, + cidr_ipv6: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[int]] = None, + ip_restriction_rule_id: Optional[pulumi.Input[int]] = None): + """ + :param pulumi.Input[str] cidr: IP CIDR range (can be IPv4 or IPv6) + :param pulumi.Input[str] cidr_ipv6: IPv6 CIDR range (read-only) + :param pulumi.Input[int] id: ID of the CIDR range + :param pulumi.Input[int] ip_restriction_rule_id: ID of the IP restriction rule + """ + if cidr is not None: + pulumi.set(__self__, "cidr", cidr) + if cidr_ipv6 is not None: + pulumi.set(__self__, "cidr_ipv6", cidr_ipv6) + if id is not None: + pulumi.set(__self__, "id", id) + if ip_restriction_rule_id is not None: + pulumi.set(__self__, "ip_restriction_rule_id", ip_restriction_rule_id) + + @property + @pulumi.getter + def cidr(self) -> Optional[pulumi.Input[str]]: + """ + IP CIDR range (can be IPv4 or IPv6) + """ + return pulumi.get(self, "cidr") + + @cidr.setter + def cidr(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "cidr", value) + + @property + @pulumi.getter(name="cidrIpv6") + def cidr_ipv6(self) -> Optional[pulumi.Input[str]]: + """ + IPv6 CIDR range (read-only) + """ + return pulumi.get(self, "cidr_ipv6") + + @cidr_ipv6.setter + def cidr_ipv6(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "cidr_ipv6", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[int]]: + """ + ID of the CIDR range + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="ipRestrictionRuleId") + def ip_restriction_rule_id(self) -> Optional[pulumi.Input[int]]: + """ + ID of the IP restriction rule + """ + return pulumi.get(self, "ip_restriction_rule_id") + + @ip_restriction_rule_id.setter + def ip_restriction_rule_id(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "ip_restriction_rule_id", value) + + if not MYPY: class JobJobCompletionTriggerConditionArgsDict(TypedDict): job_id: pulumi.Input[int] diff --git a/sdk/python/pulumi_dbtcloud/account_features.py b/sdk/python/pulumi_dbtcloud/account_features.py new file mode 100644 index 0000000..a335d12 --- /dev/null +++ b/sdk/python/pulumi_dbtcloud/account_features.py @@ -0,0 +1,248 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import sys +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias +from . import _utilities + +__all__ = ['AccountFeaturesArgs', 'AccountFeatures'] + +@pulumi.input_type +class AccountFeaturesArgs: + def __init__(__self__, *, + advanced_ci: Optional[pulumi.Input[bool]] = None, + partial_parsing: Optional[pulumi.Input[bool]] = None, + repo_caching: Optional[pulumi.Input[bool]] = None): + """ + The set of arguments for constructing a AccountFeatures resource. + :param pulumi.Input[bool] advanced_ci: Whether advanced CI is enabled. + :param pulumi.Input[bool] partial_parsing: Whether partial parsing is enabled. + :param pulumi.Input[bool] repo_caching: Whether repository caching is enabled. + """ + if advanced_ci is not None: + pulumi.set(__self__, "advanced_ci", advanced_ci) + if partial_parsing is not None: + pulumi.set(__self__, "partial_parsing", partial_parsing) + if repo_caching is not None: + pulumi.set(__self__, "repo_caching", repo_caching) + + @property + @pulumi.getter(name="advancedCi") + def advanced_ci(self) -> Optional[pulumi.Input[bool]]: + """ + Whether advanced CI is enabled. + """ + return pulumi.get(self, "advanced_ci") + + @advanced_ci.setter + def advanced_ci(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "advanced_ci", value) + + @property + @pulumi.getter(name="partialParsing") + def partial_parsing(self) -> Optional[pulumi.Input[bool]]: + """ + Whether partial parsing is enabled. + """ + return pulumi.get(self, "partial_parsing") + + @partial_parsing.setter + def partial_parsing(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "partial_parsing", value) + + @property + @pulumi.getter(name="repoCaching") + def repo_caching(self) -> Optional[pulumi.Input[bool]]: + """ + Whether repository caching is enabled. + """ + return pulumi.get(self, "repo_caching") + + @repo_caching.setter + def repo_caching(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "repo_caching", value) + + +@pulumi.input_type +class _AccountFeaturesState: + def __init__(__self__, *, + advanced_ci: Optional[pulumi.Input[bool]] = None, + partial_parsing: Optional[pulumi.Input[bool]] = None, + repo_caching: Optional[pulumi.Input[bool]] = None): + """ + Input properties used for looking up and filtering AccountFeatures resources. + :param pulumi.Input[bool] advanced_ci: Whether advanced CI is enabled. + :param pulumi.Input[bool] partial_parsing: Whether partial parsing is enabled. + :param pulumi.Input[bool] repo_caching: Whether repository caching is enabled. + """ + if advanced_ci is not None: + pulumi.set(__self__, "advanced_ci", advanced_ci) + if partial_parsing is not None: + pulumi.set(__self__, "partial_parsing", partial_parsing) + if repo_caching is not None: + pulumi.set(__self__, "repo_caching", repo_caching) + + @property + @pulumi.getter(name="advancedCi") + def advanced_ci(self) -> Optional[pulumi.Input[bool]]: + """ + Whether advanced CI is enabled. + """ + return pulumi.get(self, "advanced_ci") + + @advanced_ci.setter + def advanced_ci(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "advanced_ci", value) + + @property + @pulumi.getter(name="partialParsing") + def partial_parsing(self) -> Optional[pulumi.Input[bool]]: + """ + Whether partial parsing is enabled. + """ + return pulumi.get(self, "partial_parsing") + + @partial_parsing.setter + def partial_parsing(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "partial_parsing", value) + + @property + @pulumi.getter(name="repoCaching") + def repo_caching(self) -> Optional[pulumi.Input[bool]]: + """ + Whether repository caching is enabled. + """ + return pulumi.get(self, "repo_caching") + + @repo_caching.setter + def repo_caching(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "repo_caching", value) + + +class AccountFeatures(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + advanced_ci: Optional[pulumi.Input[bool]] = None, + partial_parsing: Optional[pulumi.Input[bool]] = None, + repo_caching: Optional[pulumi.Input[bool]] = None, + __props__=None): + """ + Manages dbt Cloud global features at the account level, like Advanced CI. The same feature should not be configured in different resources to avoid conflicts. + + When destroying the resource or removing the value for an attribute, the features status will not be changed. Deactivating features will require applying them wih the value set to `false`. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] advanced_ci: Whether advanced CI is enabled. + :param pulumi.Input[bool] partial_parsing: Whether partial parsing is enabled. + :param pulumi.Input[bool] repo_caching: Whether repository caching is enabled. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: Optional[AccountFeaturesArgs] = None, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Manages dbt Cloud global features at the account level, like Advanced CI. The same feature should not be configured in different resources to avoid conflicts. + + When destroying the resource or removing the value for an attribute, the features status will not be changed. Deactivating features will require applying them wih the value set to `false`. + + :param str resource_name: The name of the resource. + :param AccountFeaturesArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(AccountFeaturesArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + advanced_ci: Optional[pulumi.Input[bool]] = None, + partial_parsing: Optional[pulumi.Input[bool]] = None, + repo_caching: Optional[pulumi.Input[bool]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = AccountFeaturesArgs.__new__(AccountFeaturesArgs) + + __props__.__dict__["advanced_ci"] = advanced_ci + __props__.__dict__["partial_parsing"] = partial_parsing + __props__.__dict__["repo_caching"] = repo_caching + super(AccountFeatures, __self__).__init__( + 'dbtcloud:index/accountFeatures:AccountFeatures', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + advanced_ci: Optional[pulumi.Input[bool]] = None, + partial_parsing: Optional[pulumi.Input[bool]] = None, + repo_caching: Optional[pulumi.Input[bool]] = None) -> 'AccountFeatures': + """ + Get an existing AccountFeatures resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] advanced_ci: Whether advanced CI is enabled. + :param pulumi.Input[bool] partial_parsing: Whether partial parsing is enabled. + :param pulumi.Input[bool] repo_caching: Whether repository caching is enabled. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _AccountFeaturesState.__new__(_AccountFeaturesState) + + __props__.__dict__["advanced_ci"] = advanced_ci + __props__.__dict__["partial_parsing"] = partial_parsing + __props__.__dict__["repo_caching"] = repo_caching + return AccountFeatures(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="advancedCi") + def advanced_ci(self) -> pulumi.Output[bool]: + """ + Whether advanced CI is enabled. + """ + return pulumi.get(self, "advanced_ci") + + @property + @pulumi.getter(name="partialParsing") + def partial_parsing(self) -> pulumi.Output[bool]: + """ + Whether partial parsing is enabled. + """ + return pulumi.get(self, "partial_parsing") + + @property + @pulumi.getter(name="repoCaching") + def repo_caching(self) -> pulumi.Output[bool]: + """ + Whether repository caching is enabled. + """ + return pulumi.get(self, "repo_caching") + diff --git a/sdk/python/pulumi_dbtcloud/ip_restrictions_rule.py b/sdk/python/pulumi_dbtcloud/ip_restrictions_rule.py new file mode 100644 index 0000000..454131b --- /dev/null +++ b/sdk/python/pulumi_dbtcloud/ip_restrictions_rule.py @@ -0,0 +1,445 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import sys +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias +from . import _utilities +from . import outputs +from ._inputs import * + +__all__ = ['IpRestrictionsRuleArgs', 'IpRestrictionsRule'] + +@pulumi.input_type +class IpRestrictionsRuleArgs: + def __init__(__self__, *, + cidrs: pulumi.Input[Sequence[pulumi.Input['IpRestrictionsRuleCidrArgs']]], + rule_set_enabled: pulumi.Input[bool], + type: pulumi.Input[str], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None): + """ + The set of arguments for constructing a IpRestrictionsRule resource. + :param pulumi.Input[Sequence[pulumi.Input['IpRestrictionsRuleCidrArgs']]] cidrs: Set of CIDR ranges for this rule + :param pulumi.Input[bool] rule_set_enabled: Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + :param pulumi.Input[str] type: The type of the IP restriction rule (allow or deny) + :param pulumi.Input[str] description: A description of the IP restriction rule + :param pulumi.Input[str] name: The name of the IP restriction rule + """ + pulumi.set(__self__, "cidrs", cidrs) + pulumi.set(__self__, "rule_set_enabled", rule_set_enabled) + pulumi.set(__self__, "type", type) + if description is not None: + pulumi.set(__self__, "description", description) + if name is not None: + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def cidrs(self) -> pulumi.Input[Sequence[pulumi.Input['IpRestrictionsRuleCidrArgs']]]: + """ + Set of CIDR ranges for this rule + """ + return pulumi.get(self, "cidrs") + + @cidrs.setter + def cidrs(self, value: pulumi.Input[Sequence[pulumi.Input['IpRestrictionsRuleCidrArgs']]]): + pulumi.set(self, "cidrs", value) + + @property + @pulumi.getter(name="ruleSetEnabled") + def rule_set_enabled(self) -> pulumi.Input[bool]: + """ + Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + """ + return pulumi.get(self, "rule_set_enabled") + + @rule_set_enabled.setter + def rule_set_enabled(self, value: pulumi.Input[bool]): + pulumi.set(self, "rule_set_enabled", value) + + @property + @pulumi.getter + def type(self) -> pulumi.Input[str]: + """ + The type of the IP restriction rule (allow or deny) + """ + return pulumi.get(self, "type") + + @type.setter + def type(self, value: pulumi.Input[str]): + pulumi.set(self, "type", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + A description of the IP restriction rule + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + The name of the IP restriction rule + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + +@pulumi.input_type +class _IpRestrictionsRuleState: + def __init__(__self__, *, + cidrs: Optional[pulumi.Input[Sequence[pulumi.Input['IpRestrictionsRuleCidrArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rule_set_enabled: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering IpRestrictionsRule resources. + :param pulumi.Input[Sequence[pulumi.Input['IpRestrictionsRuleCidrArgs']]] cidrs: Set of CIDR ranges for this rule + :param pulumi.Input[str] description: A description of the IP restriction rule + :param pulumi.Input[str] name: The name of the IP restriction rule + :param pulumi.Input[bool] rule_set_enabled: Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + :param pulumi.Input[str] type: The type of the IP restriction rule (allow or deny) + """ + if cidrs is not None: + pulumi.set(__self__, "cidrs", cidrs) + if description is not None: + pulumi.set(__self__, "description", description) + if name is not None: + pulumi.set(__self__, "name", name) + if rule_set_enabled is not None: + pulumi.set(__self__, "rule_set_enabled", rule_set_enabled) + if type is not None: + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter + def cidrs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['IpRestrictionsRuleCidrArgs']]]]: + """ + Set of CIDR ranges for this rule + """ + return pulumi.get(self, "cidrs") + + @cidrs.setter + def cidrs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['IpRestrictionsRuleCidrArgs']]]]): + pulumi.set(self, "cidrs", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + A description of the IP restriction rule + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + The name of the IP restriction rule + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="ruleSetEnabled") + def rule_set_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + """ + return pulumi.get(self, "rule_set_enabled") + + @rule_set_enabled.setter + def rule_set_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "rule_set_enabled", value) + + @property + @pulumi.getter + def type(self) -> Optional[pulumi.Input[str]]: + """ + The type of the IP restriction rule (allow or deny) + """ + return pulumi.get(self, "type") + + @type.setter + def type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "type", value) + + +class IpRestrictionsRule(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['IpRestrictionsRuleCidrArgs', 'IpRestrictionsRuleCidrArgsDict']]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rule_set_enabled: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges. + + ## Example Usage + + ```python + import pulumi + import pulumi_dbtcloud as dbtcloud + + test = dbtcloud.IpRestrictionsRule("test", + name="My restriction rule", + description="Important description", + cidrs=[ + { + "cidr": "::ffff:106:708", + }, + { + "cidr": "1.6.7.10/24", + }, + ], + type="deny", + rule_set_enabled=False) + ``` + + ## Import + + using import blocks (requires Terraform >= 1.5) + + import { + + to = dbtcloud_ip_restrictions_rule.my_rule + + id = "ip_restriction_rule_id" + + } + + import { + + to = dbtcloud_ip_restrictions_rule.my_rule + + id = "12345" + + } + + using the older import command + + ```sh + $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule "ip_restriction_rule_id" + ``` + + ```sh + $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule 12345 + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[Union['IpRestrictionsRuleCidrArgs', 'IpRestrictionsRuleCidrArgsDict']]]] cidrs: Set of CIDR ranges for this rule + :param pulumi.Input[str] description: A description of the IP restriction rule + :param pulumi.Input[str] name: The name of the IP restriction rule + :param pulumi.Input[bool] rule_set_enabled: Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + :param pulumi.Input[str] type: The type of the IP restriction rule (allow or deny) + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: IpRestrictionsRuleArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges. + + ## Example Usage + + ```python + import pulumi + import pulumi_dbtcloud as dbtcloud + + test = dbtcloud.IpRestrictionsRule("test", + name="My restriction rule", + description="Important description", + cidrs=[ + { + "cidr": "::ffff:106:708", + }, + { + "cidr": "1.6.7.10/24", + }, + ], + type="deny", + rule_set_enabled=False) + ``` + + ## Import + + using import blocks (requires Terraform >= 1.5) + + import { + + to = dbtcloud_ip_restrictions_rule.my_rule + + id = "ip_restriction_rule_id" + + } + + import { + + to = dbtcloud_ip_restrictions_rule.my_rule + + id = "12345" + + } + + using the older import command + + ```sh + $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule "ip_restriction_rule_id" + ``` + + ```sh + $ pulumi import dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule my_rule 12345 + ``` + + :param str resource_name: The name of the resource. + :param IpRestrictionsRuleArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(IpRestrictionsRuleArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['IpRestrictionsRuleCidrArgs', 'IpRestrictionsRuleCidrArgsDict']]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rule_set_enabled: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = IpRestrictionsRuleArgs.__new__(IpRestrictionsRuleArgs) + + if cidrs is None and not opts.urn: + raise TypeError("Missing required property 'cidrs'") + __props__.__dict__["cidrs"] = cidrs + __props__.__dict__["description"] = description + __props__.__dict__["name"] = name + if rule_set_enabled is None and not opts.urn: + raise TypeError("Missing required property 'rule_set_enabled'") + __props__.__dict__["rule_set_enabled"] = rule_set_enabled + if type is None and not opts.urn: + raise TypeError("Missing required property 'type'") + __props__.__dict__["type"] = type + super(IpRestrictionsRule, __self__).__init__( + 'dbtcloud:index/ipRestrictionsRule:IpRestrictionsRule', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + cidrs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['IpRestrictionsRuleCidrArgs', 'IpRestrictionsRuleCidrArgsDict']]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + rule_set_enabled: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None) -> 'IpRestrictionsRule': + """ + Get an existing IpRestrictionsRule resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[Union['IpRestrictionsRuleCidrArgs', 'IpRestrictionsRuleCidrArgsDict']]]] cidrs: Set of CIDR ranges for this rule + :param pulumi.Input[str] description: A description of the IP restriction rule + :param pulumi.Input[str] name: The name of the IP restriction rule + :param pulumi.Input[bool] rule_set_enabled: Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + :param pulumi.Input[str] type: The type of the IP restriction rule (allow or deny) + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _IpRestrictionsRuleState.__new__(_IpRestrictionsRuleState) + + __props__.__dict__["cidrs"] = cidrs + __props__.__dict__["description"] = description + __props__.__dict__["name"] = name + __props__.__dict__["rule_set_enabled"] = rule_set_enabled + __props__.__dict__["type"] = type + return IpRestrictionsRule(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def cidrs(self) -> pulumi.Output[Sequence['outputs.IpRestrictionsRuleCidr']]: + """ + Set of CIDR ranges for this rule + """ + return pulumi.get(self, "cidrs") + + @property + @pulumi.getter + def description(self) -> pulumi.Output[Optional[str]]: + """ + A description of the IP restriction rule + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + The name of the IP restriction rule + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="ruleSetEnabled") + def rule_set_enabled(self) -> pulumi.Output[bool]: + """ + Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time. + """ + return pulumi.get(self, "rule_set_enabled") + + @property + @pulumi.getter + def type(self) -> pulumi.Output[str]: + """ + The type of the IP restriction rule (allow or deny) + """ + return pulumi.get(self, "type") + diff --git a/sdk/python/pulumi_dbtcloud/outputs.py b/sdk/python/pulumi_dbtcloud/outputs.py index 2ac6f83..f98cf26 100644 --- a/sdk/python/pulumi_dbtcloud/outputs.py +++ b/sdk/python/pulumi_dbtcloud/outputs.py @@ -30,6 +30,7 @@ 'GlobalConnectionSynapse', 'GroupGroupPermission', 'GroupPartialPermissionsGroupPermission', + 'IpRestrictionsRuleCidr', 'JobJobCompletionTriggerCondition', 'ServiceTokenServiceTokenPermission', 'GetEnvironmentsEnvironmentResult', @@ -1634,6 +1635,80 @@ def writable_environment_categories(self) -> Optional[Sequence[str]]: return pulumi.get(self, "writable_environment_categories") +@pulumi.output_type +class IpRestrictionsRuleCidr(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "cidrIpv6": + suggest = "cidr_ipv6" + elif key == "ipRestrictionRuleId": + suggest = "ip_restriction_rule_id" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in IpRestrictionsRuleCidr. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + IpRestrictionsRuleCidr.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + IpRestrictionsRuleCidr.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + cidr: Optional[str] = None, + cidr_ipv6: Optional[str] = None, + id: Optional[int] = None, + ip_restriction_rule_id: Optional[int] = None): + """ + :param str cidr: IP CIDR range (can be IPv4 or IPv6) + :param str cidr_ipv6: IPv6 CIDR range (read-only) + :param int id: ID of the CIDR range + :param int ip_restriction_rule_id: ID of the IP restriction rule + """ + if cidr is not None: + pulumi.set(__self__, "cidr", cidr) + if cidr_ipv6 is not None: + pulumi.set(__self__, "cidr_ipv6", cidr_ipv6) + if id is not None: + pulumi.set(__self__, "id", id) + if ip_restriction_rule_id is not None: + pulumi.set(__self__, "ip_restriction_rule_id", ip_restriction_rule_id) + + @property + @pulumi.getter + def cidr(self) -> Optional[str]: + """ + IP CIDR range (can be IPv4 or IPv6) + """ + return pulumi.get(self, "cidr") + + @property + @pulumi.getter(name="cidrIpv6") + def cidr_ipv6(self) -> Optional[str]: + """ + IPv6 CIDR range (read-only) + """ + return pulumi.get(self, "cidr_ipv6") + + @property + @pulumi.getter + def id(self) -> Optional[int]: + """ + ID of the CIDR range + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="ipRestrictionRuleId") + def ip_restriction_rule_id(self) -> Optional[int]: + """ + ID of the IP restriction rule + """ + return pulumi.get(self, "ip_restriction_rule_id") + + @pulumi.output_type class JobJobCompletionTriggerCondition(dict): @staticmethod