Domain |
Creates a Microsoft AD domain
To get more information about Domain, see:
* [API documentation](https://cloud.google.com/managed-microsoft-ad/reference/rest/v1/projects.locations.global.domains)
* How-to Guides
* [Managed Microsoft Active Directory Quickstart](https://cloud.google.com/managed-microsoft-ad/docs/quickstarts)
## Example Usage
### Active Directory Domain Basic
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.activedirectory.Domain;
import com.pulumi.gcp.activedirectory.DomainArgs;
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 ad_domain = new Domain("ad-domain", DomainArgs.builder()
.domainName("tfgen.org.com")
.locations("us-central1")
.reservedIpRange("192.168.255.0/24")
.build());
}
}
```
## Import
Domain can be imported using any of these accepted formats* `{{name}}` In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Domain using one of the formats above.
|
Peering |
## Example Usage
### Active Directory Peering Basic
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.activedirectory.Domain;
import com.pulumi.gcp.activedirectory.DomainArgs;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.activedirectory.Peering;
import com.pulumi.gcp.activedirectory.PeeringArgs;
import com.pulumi.resources.CustomResourceOptions;
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 source_network = new Network("source-network", NetworkArgs.Empty, CustomResourceOptions.builder()
.provider(google_beta)
.build());
var ad_domain = new Domain("ad-domain", DomainArgs.builder()
.domainName("ad.test.hashicorptest.com")
.locations("us-central1")
.reservedIpRange("192.168.255.0/24")
.authorizedNetworks(source_network.id())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var peered_project = new Project("peered-project", ProjectArgs.builder()
.projectId("my-peered-project")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var compute = new Service("compute", ServiceArgs.builder()
.project(peered_project.projectId())
.service("compute.googleapis.com")
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var peered_network = new Network("peered-network", NetworkArgs.builder()
.project(compute.project())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var ad_domain_peering = new Peering("ad-domain-peering", PeeringArgs.builder()
.domainResource(ad_domain.name())
.peeringId("ad-domain-peering")
.authorizedNetwork(peered_network.id())
.labels(Map.of("foo", "bar"))
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}
```
## Import
This resource does not support import.
|